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

40 lines
1.1 KiB
PHP
Raw Normal View History

2021-12-15 18:17:17 +01:00
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class UpdateAdviceRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
2022-08-11 12:34:27 +02:00
* @return boolean
2021-12-15 18:17:17 +01:00
*/
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',
2021-12-17 17:27:25 +01:00
'picture1' => 'sometimes|image|mimes:jpeg,png,jpg|max:1024|dimensions:width=284,height=284',
2021-12-20 14:02:37 +01:00
'alt_text_picture1' => 'required|max:255',
2021-12-17 17:27:25 +01:00
'picture2' => 'sometimes|image|mimes:jpeg,png,jpg|max:1024|dimensions:width=284,height=284',
2021-12-20 14:02:37 +01:00
'alt_text_picture2' => 'required|max:255',
2021-12-17 17:27:25 +01:00
'picture3' => 'sometimes|image|mimes:jpeg,png,jpg|max:1024|dimensions:width=284,height=284',
2021-12-20 14:02:37 +01:00
'alt_text_picture3' => 'required|max:255',
2021-12-15 18:17:17 +01:00
'text1' => 'required|max:2047',
'text2' => 'required|max:2047',
];
}
}