2023-03-29 10:06:48 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Http\Requests\Bo\StoreGroups;
|
|
|
|
|
|
|
|
|
|
use App\Http\Requests\Bo\StoreGroups\StoreStoreGroupRequest;
|
2023-03-31 09:36:56 +00:00
|
|
|
use Illuminate\Validation\Rule;
|
2023-03-29 10:06:48 +00:00
|
|
|
|
|
|
|
|
class UpdateStoreGroupRequest extends StoreStoreGroupRequest
|
|
|
|
|
{
|
2023-03-31 09:36:56 +00:00
|
|
|
/**
|
|
|
|
|
* Get the validation rules that apply to the request.
|
|
|
|
|
*
|
|
|
|
|
* @return array
|
|
|
|
|
*/
|
2025-07-10 15:19:04 +02:00
|
|
|
public function rules(): array
|
2023-03-31 09:36:56 +00:00
|
|
|
{
|
|
|
|
|
$rules = [
|
|
|
|
|
'name' => [
|
|
|
|
|
'required',
|
|
|
|
|
'min:3',
|
|
|
|
|
'max:255',
|
|
|
|
|
Rule::unique('store_groups', 'name')->ignore($this->storegroup)
|
|
|
|
|
],
|
|
|
|
|
];
|
|
|
|
|
return \array_merge(
|
|
|
|
|
$rules,
|
2023-05-04 12:07:27 +02:00
|
|
|
$this->pictureRules('picture', 200, 200, 600, 600, true),
|
2023-03-31 09:36:56 +00:00
|
|
|
);
|
|
|
|
|
}
|
2023-03-29 10:06:48 +00:00
|
|
|
}
|