Files
online.tbbank.gov.tm-larave…/app/Repos/System/Nova/NovaPermissionRepo.php
2025-09-08 14:38:55 +05:00

42 lines
843 B
PHP

<?php
namespace App\Repos\System\Nova;
use Closure;
use Illuminate\Support\Facades\Gate;
class NovaPermissionRepo
{
/**
* Check if user is me
*/
public static function isMe(): Closure
{
return fn () => Gate::allows('isMe', auth()->user());
}
/**
* Check if user is admin
*/
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());
}
/**
* Check if user is a currency maintainer
*/
public static function isCurrencyMaintainer(): Closure
{
return fn () => Gate::allows('isCurrencyMaintainer', auth()->user());
}
}