This commit is contained in:
2023-12-14 20:29:39 +05:00
parent 382317f1ae
commit 84bcc2e517
3 changed files with 11 additions and 2 deletions

View File

@@ -86,7 +86,15 @@ class NovaRepo
/**
* Check if user is admin
*/
public function isAdmin(): Closure
public static function isSuperAdmin(): Closure
{
return fn () => Gate::allows('isSuperAdmin', auth()->user());
}
/**
* Check if user is admin
*/
public static function isAdmin(): Closure
{
return fn () => Gate::allows('isAdmin', auth()->user());
}