uses gate
This commit is contained in:
@@ -12,7 +12,7 @@ class UpdateUserAdminStatusRequest extends FormRequest
|
|||||||
*/
|
*/
|
||||||
public function authorize(): bool
|
public function authorize(): bool
|
||||||
{
|
{
|
||||||
return $this->user()?->is_admin === true;
|
return $this->user()?->can('access-admin') ?? false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user