delete unique to department in requests
Tests & Lint & Deploy to Railway / build (2.6.6, 20.x, 8.3) (push) Successful in 1m52s Details
Tests & Lint & Deploy to Railway / deploy (push) Successful in 33s Details

This commit is contained in:
aslan 2024-03-14 11:00:35 +03:00
parent 03b8fa831d
commit c6742d7d5e
2 changed files with 2 additions and 3 deletions

View File

@ -16,7 +16,7 @@ class StoreDepartmentRequest extends FormRequest
{
return [
'position' => 'required|int|numeric|max:255',
'name' => 'required|string|max:255|unique:departments,name',
'name' => 'required|string|max:255',
'description' => 'nullable|string',
'slug' => 'nullable|string|max:255|unique:departments,slug',
'faculty_id' => 'required|numeric|int|max:1000',

View File

@ -25,8 +25,7 @@ class UpdateDepartmentRequest extends FormRequest
'name' => [
'required',
'string',
'max:255',
"unique:departments,name,{$this->department->id}",
'max:255'
],
];
}