matab-panel/app/Policies/PatientIllnessPolicy.php

70 lines
1.8 KiB
PHP

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