43 lines
1.2 KiB
PHP
43 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Requests\V3\Azmayesh;
|
|
|
|
use Illuminate\Contracts\Validation\ValidationRule;
|
|
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, ValidationRule|array|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',
|
|
];
|
|
}
|
|
}
|