25 lines
694 B
PHP
25 lines
694 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}",
|
|
'direction_id' => 'required|int|numeric|max:255',
|
|
'position' => 'required|int|numeric|max:255',
|
|
];
|
|
}
|
|
}
|