mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-08-18 17:38:20 +02:00
Control & Promote administrator status via a method rather than a prop
This commit is contained in:
@@ -16,7 +16,7 @@ class AdminOnly
|
||||
*/
|
||||
public function handle($request, Closure $next)
|
||||
{
|
||||
if (! Auth::user()->is_admin) {
|
||||
if (! Auth::user()->isAdministrator()) {
|
||||
throw new AuthorizationException;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user