forked from aslan/applicant-site
prodV1 #2
|
@ -1,31 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class StoreFileRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*/
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'name' => 'max:255',
|
||||
'position' => 'int|max:255',
|
||||
'url' => 'file',
|
||||
'idReceptionScreen' => 'int|max:255',
|
||||
];
|
||||
}
|
||||
}
|
|
@ -1,30 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class UpdateFileRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*/
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'name' => 'required|max:255',
|
||||
'position' => 'required||int|max:255',
|
||||
'idReceptionScreen' => 'int|max:255',
|
||||
];
|
||||
}
|
||||
}
|
|
@ -16,7 +16,7 @@ class StoreDepartmentRequest extends FormRequest
|
|||
{
|
||||
return [
|
||||
'position' => 'required|int|max:255',
|
||||
'name' => 'required|string|max:255|unique:educational_institutions,name',
|
||||
'name' => 'required|string|max:255|unique:departments,name',
|
||||
'description' => 'string',
|
||||
'slug' => 'required|string',
|
||||
'faculty_id' => 'required|int',
|
||||
|
|
|
@ -15,7 +15,7 @@ class StoreDirectionRequest extends FormRequest
|
|||
{
|
||||
return [
|
||||
'position' => 'required|int|max:255',
|
||||
'name' => 'required|string|max:255|unique:educational_institutions,name',
|
||||
'name' => 'required|string|max:255|unique:directions,name',
|
||||
'description' => 'string',
|
||||
'slug' => 'required|string',
|
||||
'department_id' => 'required|int'
|
||||
|
|
|
@ -14,7 +14,7 @@ class StoreEducationalInstitutionRequest extends FormRequest
|
|||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'position' => 'int|max:255',
|
||||
'position' => 'required|int|max:255',
|
||||
'name' => 'required|string|max:255|unique:educational_institutions,name',
|
||||
'description' => 'string',
|
||||
'slug' => 'required|string',
|
||||
|
|
|
@ -15,11 +15,11 @@ class StoreFacultyRequest extends FormRequest
|
|||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'position' => 'int|max:255',
|
||||
'name' => 'required|string|max:255|unique:educational_institutions,name',
|
||||
'position' => 'required|int|max:255',
|
||||
'name' => 'required|string|max:255|unique:faculties,name',
|
||||
'description' => 'string',
|
||||
'slug' => 'required|string',
|
||||
'educational_institution_id' => 'int'
|
||||
'educational_institution_id' => 'required|int'
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ class UpdateDepartmentRequest extends FormRequest
|
|||
'required',
|
||||
'string',
|
||||
'max:255',
|
||||
"unique:educational_institutions,name,{$this->department->id}",
|
||||
"unique:departments,name,{$this->department->id}",
|
||||
],
|
||||
];
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ class UpdateDirectionRequest extends FormRequest
|
|||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'position' => 'int|max:255',
|
||||
'position' => 'required|int|max:255',
|
||||
'description' => 'string',
|
||||
'department_id' => 'int|required',
|
||||
'slug' => 'required|string',
|
||||
|
@ -23,7 +23,7 @@ class UpdateDirectionRequest extends FormRequest
|
|||
'required',
|
||||
'string',
|
||||
'max:255',
|
||||
"unique:educational_institutions,name,{$this->direction->id}",
|
||||
"unique:directions,name,{$this->direction->id}",
|
||||
],
|
||||
];
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ class UpdateEducationalInstitutionRequest extends FormRequest
|
|||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'position' => 'int|max:255',
|
||||
'position' => 'required|int|max:255',
|
||||
'description' => 'string',
|
||||
'slug' => 'required|string',
|
||||
'name' => [
|
||||
|
|
|
@ -14,10 +14,10 @@ class UpdateFacultyRequest extends FormRequest
|
|||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'position' => 'int|max:255',
|
||||
'position' => 'required|int|max:255',
|
||||
'description' => 'string',
|
||||
'slug' => 'required|string',
|
||||
'educational_institution_id' => 'int',
|
||||
'educational_institution_id' => 'required|int',
|
||||
'name' => [
|
||||
'required',
|
||||
'string',
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
namespace App\Http\Requests\admin;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
namespace App\Http\Requests\admin;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
Loading…
Reference in New Issue