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,20 @@
<?php
namespace App\Http\Requests\Roles;
use App\Http\Requests\ApiFormRequest;
class RoleSwitchRequest extends ApiFormRequest
{
public function authorize(): bool
{
return auth()->check();
}
public function rules(): array
{
return [
'role' => ['required', 'string', 'max:255'],
];
}
}