Files
kelas-taming/app/Http/Requests/StoreRoleRequest.php
2026-05-11 12:29:11 +08:00

29 lines
632 B
PHP

<?php
namespace App\Http\Requests;
use Illuminate\Contracts\Validation\ValidationRule;
use Illuminate\Foundation\Http\FormRequest;
class StoreRoleRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return true;
}
/**
* @return array<string, ValidationRule|array<mixed>|string>
*/
public function rules(): array
{
return [
'name' => ['required', 'string', 'max:255', 'unique:roles,name'],
'description' => ['nullable', 'string', 'max:500'],
];
}
}