add role permission logic

This commit is contained in:
root
2026-03-10 17:11:48 -04:00
parent abebe0d9c0
commit c235fd2170
40 changed files with 1896 additions and 838 deletions
@@ -0,0 +1,22 @@
<?php
namespace App\Http\Requests\Roles;
use App\Http\Requests\ApiFormRequest;
use Illuminate\Validation\Rule;
class PermissionStoreRequest extends ApiFormRequest
{
public function authorize(): bool
{
return auth()->check();
}
public function rules(): array
{
return [
'name' => ['required', 'string', 'max:255', 'unique:permissions,name'],
'description' => ['nullable', 'string', 'max:500'],
];
}
}