update deploy
This commit is contained in:
44
app/Http/Requests/HeroSlide/StoreHeroSlideRequest.php
Normal file
44
app/Http/Requests/HeroSlide/StoreHeroSlideRequest.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\HeroSlide;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class StoreHeroSlideRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, array<int, string>>
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'label' => ['nullable', 'string', 'max:255'],
|
||||
'title' => ['required', 'string', 'max:255'],
|
||||
'description' => ['nullable', 'string'],
|
||||
'media_type' => ['sometimes', 'string', 'in:image,video'],
|
||||
'image' => ['nullable', 'string', 'max:255'],
|
||||
'video_url' => ['nullable', 'string', 'max:255'],
|
||||
'mobile_video_url' => ['nullable', 'string', 'max:255'],
|
||||
'mobile_image' => ['nullable', 'string', 'max:255'],
|
||||
'button_text' => ['nullable', 'string', 'max:100'],
|
||||
'button_url' => ['nullable', 'string', 'max:255'],
|
||||
'order_index' => ['sometimes', 'integer', 'min:0'],
|
||||
'is_active' => ['sometimes', 'boolean'],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public function messages(): array
|
||||
{
|
||||
return [
|
||||
'title.required' => 'Başlık zorunludur.',
|
||||
];
|
||||
}
|
||||
}
|
||||
34
app/Http/Requests/HeroSlide/UpdateHeroSlideRequest.php
Normal file
34
app/Http/Requests/HeroSlide/UpdateHeroSlideRequest.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\HeroSlide;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class UpdateHeroSlideRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, array<int, string>>
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'label' => ['nullable', 'string', 'max:255'],
|
||||
'title' => ['sometimes', 'string', 'max:255'],
|
||||
'description' => ['nullable', 'string'],
|
||||
'media_type' => ['sometimes', 'string', 'in:image,video'],
|
||||
'image' => ['nullable', 'string', 'max:255'],
|
||||
'video_url' => ['nullable', 'string', 'max:255'],
|
||||
'mobile_video_url' => ['nullable', 'string', 'max:255'],
|
||||
'mobile_image' => ['nullable', 'string', 'max:255'],
|
||||
'button_text' => ['nullable', 'string', 'max:100'],
|
||||
'button_url' => ['nullable', 'string', 'max:255'],
|
||||
'order_index' => ['sometimes', 'integer', 'min:0'],
|
||||
'is_active' => ['sometimes', 'boolean'],
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user