<?php
 namespace App\Policies; use App\Models\Admin; use App\Models\CancellationRequest; use Illuminate\Auth\Access\HandlesAuthorization; class CancellationRequestPolicy { use HandlesAuthorization; public function viewAny(Admin $admin): bool { return $admin->hasPermissionTo('view cancellation requests'); } public function view(Admin $admin, CancellationRequest $cancellationRequest): bool { return $admin->hasPermissionTo('view cancellation requests'); } public function create(Admin $admin): bool { return $admin->hasPermissionTo('create cancellation requests'); } public function update(Admin $admin, CancellationRequest $cancellationRequest): bool { return $admin->hasPermissionTo('update cancellation requests'); } public function updateAny(Admin $admin): bool { return $admin->hasPermissionTo('update cancellation requests'); } public function delete(Admin $admin, CancellationRequest $cancellationRequest): bool { return $admin->hasPermissionTo('delete cancellation requests'); } public function deleteAny(Admin $admin): bool { return $admin->hasPermissionTo('delete cancellation requests'); } public function approve(Admin $admin, CancellationRequest $cancellationRequest): bool { return $admin->hasPermissionTo('approve cancellation requests'); } public function reject(Admin $admin, CancellationRequest $cancellationRequest): bool { return $admin->hasPermissionTo('reject cancellation requests'); } public function cancel(Admin $admin, CancellationRequest $cancellationRequest): bool { return $admin->hasPermissionTo('cancel cancellation requests'); } } 