create show,store,update and delete for RoadMaintenanceStationController

This commit is contained in:
2025-04-09 16:21:58 +03:30
parent 9e1b25d9a1
commit 21f2dd7c2f
5 changed files with 312 additions and 66 deletions

View File

@@ -0,0 +1,52 @@
<?php
namespace App\Http\Requests\V3\RoadMaintenanceStation;
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 [
'status' => 'integer|in:0,1',
'type' => 'integer|in:1,2,3',
'team_num' => 'numeric',
'staff_num' => 'numeric',
'phone' => 'string|max:50',
'responsible_name' => 'string|max:255',
'responsible_mobile' => 'string|max:50',
'successor_name' => 'string|max:255',
'successor_mobile' => 'string|max:50',
'machines_light' => 'numeric',
'machines_sheavy' => 'numeric',
'machines_heavy' => 'numeric',
'lat' => 'numeric',
'lng' => 'numeric',
'lat_from' => 'numeric',
'lng_from' => 'numeric',
'lat_to' => 'numeric',
'lng_to' => 'numeric',
'color' => 'numeric',
'geometry' => 'numeric',
'overview_files_1' => 'file|mimes:jpg,jpeg,png,pdf|max:5120',
'overview_files_2' => 'file|mimes:jpg,jpeg,png,pdf|max:5120',
'overview_files_3' => 'file|mimes:jpg,jpeg,png,pdf|max:5120',
'overview_files_4' => 'file|mimes:jpg,jpeg,png,pdf|max:5120',
'overview_files_5' => 'file|mimes:jpg,jpeg,png,pdf|max:5120',
];
}
}