24 lines
632 B
PHP
24 lines
632 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests\admin\Catalog\Direction;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class UpdateDirectionProfileRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'name' => "required|string|max:255|unique:direction_profiles,name,{$this->direction_profile->id}",
|
|
'description' => 'string',
|
|
'slug' => "required|string|max:255|unique:direction_profiles,slug,{$this->direction_profile->id}",
|
|
'position' => 'required|int|numeric|max:255',
|
|
];
|
|
}
|
|
}
|