Files

75 lines
1.9 KiB
PHP
Raw Permalink Normal View History

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