create daily accident cartable
This commit is contained in:
94
app/Http/Requests/V3/DailyAccident/StoreRequest.php
Normal file
94
app/Http/Requests/V3/DailyAccident/StoreRequest.php
Normal file
@@ -0,0 +1,94 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\V3\DailyAccident;
|
||||
|
||||
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 [
|
||||
'province_id' => 'required|integer|exists:provinces,id',
|
||||
'axis_name' => 'required|string|max:255',
|
||||
'axis_type' => '',
|
||||
'axis_start' => '',
|
||||
'axis_end' => '',
|
||||
'distance_axis_start' => '',
|
||||
'local_name' => '',
|
||||
'lat' => '',
|
||||
'lng' => '',
|
||||
'police_serial' => '',
|
||||
'accident_date' => '',
|
||||
'accident_time' => '',
|
||||
'day_of_the_week' => '',
|
||||
'direction' => '',
|
||||
'number_of_injured' => '',
|
||||
'number_of_died' => '',
|
||||
'weather_condition' => '',
|
||||
'way_geometri' => '',
|
||||
'collision_type' => '',
|
||||
'participants_heavy_vehicle' => '',
|
||||
'participants_light_vehicle' => '',
|
||||
'participants_bicycle' => '',
|
||||
'accident_type' => '',
|
||||
'legal_speed' => '',
|
||||
'avarage_speed' => '',
|
||||
'increase_damage_reasons_feqdan_jodakonnande_dar_miyane_rah' => '',
|
||||
'increase_damage_reasons_naqs_ya_adam_kefayat_hefaze_miyani' => '',
|
||||
'increase_damage_reasons_naqs_ya_adam_kefayat_narde_pol' => '',
|
||||
'increase_damage_reasons_naqs_ya_adam_kefayat' => '',
|
||||
'increase_damage_reasons_naqs_dar_naheye_enteqali' => '',
|
||||
'increase_damage_reasons_mane_solb_bedone_hefaz' => '',
|
||||
'increase_damage_reasons_sar_azad_hefaz' => '',
|
||||
'increase_damage_reasons_shirvani_tond_ya_partgah' => '',
|
||||
'accident_reason_dor_monaseb_dar_qus' => '',
|
||||
'accident_reason_saraziri_tond' => '',
|
||||
'accident_reason_nabod_dar_khat_sebqat_dar_sarbalaye' => '',
|
||||
'accident_reason_mantaqe_ba_rizesh_az_divar' => '',
|
||||
'accident_reason_mantaqe_ba_afzayesh_nagahani' => '',
|
||||
'accident_reason_kahesh_na_monaseb_tedad' => '',
|
||||
'accident_reason_mantaqe_ba_obor_heyvanat_ahli' => '',
|
||||
'accident_reason_mantaqe_ba_tadakhol_terafiki' => '',
|
||||
'accident_reason_arze_kam_savare_ro' => '',
|
||||
'accident_reason_mantaqe_meh_gir' => '',
|
||||
'accident_reason_adam_roshanaye_zarori_dar_noqte' => '',
|
||||
'accident_reason_tabdil_na_monaseb_noe_rah' => '',
|
||||
'accident_reason_oftadegi_dar_labe_asphalt' => '',
|
||||
'accident_reason_naqs_dar_ashkarsazi_navahi' => '',
|
||||
'accident_reason_mahal_na_monaseb_dastrasi' => '',
|
||||
'accident_reason_roye_na_monaseb' => '',
|
||||
'accident_reason_naqs_dar_ashkar_sazi_shrayet_khas' => '',
|
||||
'accident_reason_hendese_na_monaseb_vorodi_va_khoroji' => '',
|
||||
'accident_reason_adam_rayat_fasele_tooli' => '',
|
||||
'accident_reason_naqs_dar_alayem_ekhtari_va_entezami' => '',
|
||||
'accident_reason_qus_ofoqi_dar_saraziri_tond' => '',
|
||||
'accident_reason_adam_rayat_obor' => '',
|
||||
'accident_reason_naqs_dar_alayem_pish_agahi' => '',
|
||||
'accident_reason_qarar_gire_qus_ofoqi' => '',
|
||||
'accident_reason_adam_rayat_sebghat_mojaz' => '',
|
||||
'accident_reason_did_na_kafi' => '',
|
||||
'accident_reason_qus_tond_qaem' => '',
|
||||
'accident_reason_adam_rayat_sorat_mojaz' => '',
|
||||
'accident_reason_ebham_dar_masir' => '',
|
||||
'accident_reason_qus_tond_ofoghi' => '',
|
||||
'first_image' => '',
|
||||
'second_image' => '',
|
||||
'police_file' => '',
|
||||
];
|
||||
}
|
||||
}
|
||||
30
app/Http/Requests/V3/DailyAccident/SupervisorRequest.php
Normal file
30
app/Http/Requests/V3/DailyAccident/SupervisorRequest.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\V3\DailyAccident;
|
||||
|
||||
use Illuminate\Contracts\Validation\ValidationRule;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class SupervisorRequest 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 [
|
||||
'state' => 'required|in:0,1',
|
||||
'message' => 'required_if:state,2|string',
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user