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

37 lines
977 B
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.
*
* @return bool
*/
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',
'picture2' => 'sometimes|image|mimes:jpeg,png,jpg|max:1024|dimensions:width=284,height=284',
'picture3' => 'sometimes|image|mimes:jpeg,png,jpg|max:1024|dimensions:width=284,height=284',
2021-12-15 18:17:17 +01:00
'text1' => 'required|max:2047',
'text2' => 'required|max:2047',
];
}
}