Files
backend/app/Http/Requests/V3/Azmayesh/UpdateRequest.php

42 lines
1.2 KiB
PHP

<?php
namespace App\Http\Requests\V3\Azmayesh;
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 [
'lat' => 'required|string',
'lng' => 'required|string',
'azmayesh_type_id' => 'required|exists:azmayesh_types,id',
'request_date' => 'date',
'report_date' => 'date',
'request_number' => 'string',
'employer' => 'string',
'contractor' => 'string',
'work_number' => 'string',
'project_name' => 'required|string',
'consultant' => 'string',
'applicant' => 'string',
'province_id' => 'required|exists:provinces,id',
'contract_subitem_id' => 'required|exists:contract_subitems,id',
];
}
}