ldc-doux/app/Http/Requests/UpdateEncartRequest.php

35 lines
751 B
PHP
Raw Permalink Normal View History

2021-12-08 17:32:56 +01:00
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class UpdateEncartRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
2022-08-11 12:34:27 +02:00
* @return boolean
2021-12-08 17:32:56 +01:00
*/
public function authorize()
{
2021-12-09 17:31:10 +01:00
return auth()->check();
2021-12-08 17:32:56 +01:00
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
2021-12-09 17:31:10 +01:00
'title' => 'required|max:255',
2021-12-13 16:55:12 +01:00
'subtitle' => 'sometimes|max:255',
2021-12-09 17:31:10 +01:00
'text' => 'required|max:2047',
2021-12-13 16:55:12 +01:00
'picture' => 'sometimes|image|mimes:jpeg,png,jpg|max:2048',
2022-02-01 10:02:05 +01:00
'alt_text_picture' => 'sometimes|max:255',
2021-12-08 17:32:56 +01:00
];
}
}