feat: add created_by field handling for flights

This commit is contained in:
2026-08-19 13:31:25 +03:30
parent 700bd38c20
commit 7cf68cc02f
103 changed files with 29226 additions and 18 deletions
+92
View File
@@ -0,0 +1,92 @@
<?php
namespace App\Http\Requests;
use Illuminate\Contracts\Validation\ValidationRule;
use Illuminate\Foundation\Http\FormRequest;
class TourStoreRequest 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<mixed>|string>
*/
public function rules(): array
{
return [
'title' => [
'required',
'string',
'max:255'
],
'summary' => [
'required',
'string',
'max:500'
],
'description' => [
'required',
'string'
],
'image' => [
'nullable',
'image',
'mimes:jpg,jpeg,png,webp',
'max:2048'
],
'views' => [
'nullable',
'integer',
'min:0'
],
'travel_type_id' => [
'required',
'integer'
],
'price' => [
'required',
'numeric',
'min:0'
],
'views'=>[
'nullable',
'integer',
'min:0'
],
'departure_date' => [
'required',
'date',
'after_or_equal:today',
],
'status' => [
'required',
'integer',
'in:0,1,2,3,4'
]
];
}
}