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

35 lines
836 B
PHP
Raw Normal View History

2021-12-17 17:27:25 +01:00
<?php
namespace App\Http\Requests;
class UpdatePostRequest extends StorePostRequest
{
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return array_merge(
parent::rules(),
[
'picture_news' => [
'sometimes',
'image',
'mimes:jpeg,png,jpg',
'max:1024',
'dimensions:max_width=380,max_height=298'
],
'picture_home' => [
'sometimes',
'image',
'mimes:jpeg,png,jpg',
'max:2048',
'dimensions:max_width=1030,max_height=239'
],
]
);
}
}