create datatable for observed item

This commit is contained in:
2025-01-04 14:57:43 +03:30
parent 294f89b4ad
commit 311f03921c
3 changed files with 108 additions and 1 deletions

View File

@@ -0,0 +1,39 @@
<?php
namespace App\Http\Requests\V3\ObservedItem;
use Illuminate\Foundation\Http\FormRequest;
class FilterRequest 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 [
'start_date' => 'date_format:Y-m-d',
'end_date' => 'date_format:Y-m-d|after_or_equal:start_date',
'road_patrol_id' => 'numeric',
'item_id' => 'numeric',
];
}
public function attributes(): array
{
return [
'start_date' => 'ساعت شروع گشت',
'end_date' => 'ساعت پایان گشت',
];
}
}