forked from aslan/applicant-site
delete unique to department in requests
This commit is contained in:
parent
03b8fa831d
commit
c6742d7d5e
|
@ -16,7 +16,7 @@ class StoreDepartmentRequest extends FormRequest
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'position' => 'required|int|numeric|max:255',
|
'position' => 'required|int|numeric|max:255',
|
||||||
'name' => 'required|string|max:255|unique:departments,name',
|
'name' => 'required|string|max:255',
|
||||||
'description' => 'nullable|string',
|
'description' => 'nullable|string',
|
||||||
'slug' => 'nullable|string|max:255|unique:departments,slug',
|
'slug' => 'nullable|string|max:255|unique:departments,slug',
|
||||||
'faculty_id' => 'required|numeric|int|max:1000',
|
'faculty_id' => 'required|numeric|int|max:1000',
|
||||||
|
|
|
@ -25,8 +25,7 @@ class UpdateDepartmentRequest extends FormRequest
|
||||||
'name' => [
|
'name' => [
|
||||||
'required',
|
'required',
|
||||||
'string',
|
'string',
|
||||||
'max:255',
|
'max:255'
|
||||||
"unique:departments,name,{$this->department->id}",
|
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue