compleate controller and routs
This commit is contained in:
38
app/Http/Requests/V3/Mission/RequestPortal/UpdateRequest.php
Normal file
38
app/Http/Requests/V3/Mission/RequestPortal/UpdateRequest.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\V3\Mission\RequestPortal;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class UpdateRequest 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_machine_type' => 'required|string|max:255',
|
||||
'requested_machine_numbers'=> 'required|integer|max:255',
|
||||
'type' => 'required|string|max:50',
|
||||
'start_date' => 'required|date',
|
||||
'end_date' => 'required|date',
|
||||
'request_date' => 'required|date',
|
||||
'description' => 'string',
|
||||
'start_point' => 'required|string',
|
||||
'end_point' => 'required|string',
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user