ldc-domaine-de-lanvaux/app/Http/Requests/StoreBannerRequest.php

33 lines
697 B
PHP
Raw Permalink Normal View History

2022-08-05 09:38:44 +00:00
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class StoreBannerRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return boolean
*/
public function authorize(): bool
{
return auth()->check();
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules(): array
{
return [
'title' => 'required',
'picture' => 'sometimes|image|mimes:jpeg,png,jpg|max:2048|dimensions:width=1920,height=591',
'alt_text_picture' => 'required|max:255',
];
}
}