24 lines
529 B
PHP
24 lines
529 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class StorePermissionRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'name' => ['required', 'string', 'max:255'],
|
|
'category' => ['sometimes', 'string', 'max:100'],
|
|
'description' => ['nullable', 'string', 'max:255'],
|
|
'guard_name' => ['sometimes', 'string', 'max:255'],
|
|
];
|
|
}
|
|
}
|