ldc-doux/app/Http/Requests/UpdateAdviceRequest.php
2022-08-11 12:34:27 +02:00

39 lines
1.1 KiB
PHP

<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class UpdateAdviceRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return boolean
*/
public function authorize()
{
return auth()->check();
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'title1' => 'required|max:50',
'title2' => 'required|max:50',
'picture1' => 'sometimes|image|mimes:jpeg,png,jpg|max:1024|dimensions:width=284,height=284',
'alt_text_picture1' => 'required|max:255',
'picture2' => 'sometimes|image|mimes:jpeg,png,jpg|max:1024|dimensions:width=284,height=284',
'alt_text_picture2' => 'required|max:255',
'picture3' => 'sometimes|image|mimes:jpeg,png,jpg|max:1024|dimensions:width=284,height=284',
'alt_text_picture3' => 'required|max:255',
'text1' => 'required|max:2047',
'text2' => 'required|max:2047',
];
}
}