Files
tbbank-new/app/Modules/CardPinOrder/Policies/CardPinOrderPolicy.php
2025-11-03 11:54:07 +05:00

70 lines
1.8 KiB
PHP

<?php
declare(strict_types=1);
namespace App\Modules\CardPinOrder\Policies;
use App\Modules\CardPinOrder\Models\CardPinOrder;
use Illuminate\Auth\Access\HandlesAuthorization;
use Illuminate\Foundation\Auth\User as AuthUser;
class CardPinOrderPolicy
{
use HandlesAuthorization;
public function viewAny(AuthUser $authUser): bool
{
return $authUser->can('ViewAny:CardPinOrder');
}
public function view(AuthUser $authUser, CardPinOrder $cardPinOrder): bool
{
return $authUser->can('View:CardPinOrder');
}
public function create(AuthUser $authUser): bool
{
return $authUser->can('Create:CardPinOrder');
}
public function update(AuthUser $authUser, CardPinOrder $cardPinOrder): bool
{
return $authUser->can('Update:CardPinOrder');
}
public function delete(AuthUser $authUser, CardPinOrder $cardPinOrder): bool
{
return $authUser->can('Delete:CardPinOrder');
}
public function restore(AuthUser $authUser, CardPinOrder $cardPinOrder): bool
{
return $authUser->can('Restore:CardPinOrder');
}
public function forceDelete(AuthUser $authUser, CardPinOrder $cardPinOrder): bool
{
return $authUser->can('ForceDelete:CardPinOrder');
}
public function forceDeleteAny(AuthUser $authUser): bool
{
return $authUser->can('ForceDeleteAny:CardPinOrder');
}
public function restoreAny(AuthUser $authUser): bool
{
return $authUser->can('RestoreAny:CardPinOrder');
}
public function replicate(AuthUser $authUser, CardPinOrder $cardPinOrder): bool
{
return $authUser->can('Replicate:CardPinOrder');
}
public function reorder(AuthUser $authUser): bool
{
return $authUser->can('Reorder:CardPinOrder');
}
}