Roman_applicant-site/app/Http/Requests/admin/Catalog/UpdateEducationLevelRequest...

23 lines
488 B
PHP

<?php
namespace App\Http\Requests\admin\Catalog;
use Illuminate\Foundation\Http\FormRequest;
class UpdateEducationLevelRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
public function rules(): array
{
return [
'name' => "required|string|max:255|unique:education_levels,name,{$this->education_level->id}",
'description' => 'string',
'slug' => 'required|string',
];
}
}