38 lines
1014 B
PHP
38 lines
1014 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests\V3\Mission\RequestPortal;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class StoreRequest 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 [
|
|
'rahdaran' => 'required|array',
|
|
'rahdaran.*' => 'exists:rahdaran,id',
|
|
'requested_machines' => 'required|array',
|
|
'type' => 'required|string|max:50',
|
|
'start_date' => 'required|date',
|
|
'end_date' => 'required|date',
|
|
'request_date' => 'required|date',
|
|
'description' => 'string',
|
|
'end_point' => 'required|string',
|
|
'area' => 'required|array',
|
|
];
|
|
}
|
|
}
|