<?php

namespace App\Http\Requests\Admin;

use Illuminate\Foundation\Http\FormRequest;

class StoreBoardPatternRequest extends FormRequest
{
    public function authorize(): bool
    {
        return auth()->check();
    }

    public function rules(): array
    {
        return [
            'pagename' => ['required', 'string', 'max:200', 'unique:boardpattern,boardname'],
            'pageorder' => ['nullable', 'string', 'max:20'],
            'photoid' => ['nullable', 'integer', 'exists:attachements,id'],
        ];
    }
}
