36 lines
895 B
PHP
36 lines
895 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Http\Requests;
|
||
|
|
|
||
|
|
class UpdateGammeRequest extends StoreGammeRequest
|
||
|
|
{
|
||
|
|
/**
|
||
|
|
* Get the validation rules that apply to the request.
|
||
|
|
*
|
||
|
|
* @return array
|
||
|
|
*/
|
||
|
|
public function rules(): array
|
||
|
|
{
|
||
|
|
return array_merge(
|
||
|
|
parent::rules(),
|
||
|
|
[
|
||
|
|
'slug' => 'required|unique:gammes,slug,' . $this->gamme->id,
|
||
|
|
'picture' => [
|
||
|
|
'sometimes',
|
||
|
|
'image',
|
||
|
|
'mimes:jpeg,png,jpg',
|
||
|
|
'max:1024',
|
||
|
|
'dimensions:width=370,height=370'
|
||
|
|
],
|
||
|
|
'banner' => [
|
||
|
|
'sometimes',
|
||
|
|
'image',
|
||
|
|
'mimes:jpeg,png,jpg',
|
||
|
|
'max:2048',
|
||
|
|
'dimensions:width=1920,height=591'
|
||
|
|
],
|
||
|
|
]
|
||
|
|
);
|
||
|
|
}
|
||
|
|
}
|