<?php

namespace App\Http\Requests\Admin;

use Illuminate\Foundation\Http\FormRequest;

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

    public function rules(): array
    {
        return [
            'pagename' => ['required', 'string', 'max:200', 'unique:studentsgroup,studentsgroupname'],
            'pageorder' => ['nullable', 'integer', 'min:0', 'max:99'],
            'photoid' => ['nullable', 'integer', 'exists:attachements,id'],
        ];
    }
}
