feat: add tour list and show and edit and delete tours in admin panel
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Tours;
|
||||
|
||||
use Illuminate\Contracts\Validation\ValidationRule;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class TourUpdatePostRequest 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',
|
||||
'min:3',
|
||||
'max:150',
|
||||
],
|
||||
|
||||
'file_id' => [
|
||||
'nullable',
|
||||
'exists:files,id',
|
||||
],
|
||||
|
||||
'tour_type' => [
|
||||
'required',
|
||||
'string',
|
||||
'max:255',
|
||||
],
|
||||
|
||||
'summary' => [
|
||||
'required',
|
||||
'string',
|
||||
],
|
||||
|
||||
'description' => [
|
||||
'required',
|
||||
'string',
|
||||
],
|
||||
|
||||
'origin_airports_id' => [
|
||||
'required',
|
||||
'exists:airports,id',
|
||||
],
|
||||
|
||||
'destination_airports_id' => [
|
||||
'required',
|
||||
'exists:airports,id',
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user