34 lines
836 B
PHP
34 lines
836 B
PHP
<?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'
|
|
],
|
|
]
|
|
);
|
|
}
|
|
}
|