Control & Promote administrator status via a method rather than a prop

This commit is contained in:
Bubka
2024-01-26 18:14:02 +01:00
parent d96c943927
commit 8b397750e8
8 changed files with 43 additions and 12 deletions

View File

@@ -16,7 +16,7 @@ class AdminOnly
*/
public function handle($request, Closure $next)
{
if (! Auth::user()->is_admin) {
if (! Auth::user()->isAdministrator()) {
throw new AuthorizationException;
}