Files
tbbank-new/app/Modules/VisaMasterPaymentOrder/Policies/VisaMasterPaymentOrderPolicy.php
Mekan1206 5e37bd1a76 Enhance ListRecords pages with tab functionality and default sorting
- Added getTabs method to ListCardPinOrders, ListLoanOrders, and ListLoanOrderMobiles pages to display order statuses for system users.
- Implemented default sorting by 'created_at' in LoanOrdersTable and LoanOrderMobilesTable for improved data organization.
- Updated ManageCards page to ensure proper type declaration for getTitle method.
2025-12-21 05:21:53 +05:00

50 lines
1.3 KiB
PHP

<?php
declare(strict_types=1);
namespace App\Modules\VisaMasterPaymentOrder\Policies;
use App\Models\User;
use App\Modules\VisaMasterPaymentOrder\Models\VisaMasterPaymentOrder;
use Illuminate\Auth\Access\HandlesAuthorization;
class VisaMasterPaymentOrderPolicy
{
use HandlesAuthorization;
public function viewAny(User $user): bool
{
return $user->can('ViewAny:VisaMasterPaymentOrder');
}
public function view(User $user, VisaMasterPaymentOrder $visaMasterPaymentOrder): bool
{
return $user->can('View:VisaMasterPaymentOrder');
}
public function create(User $user): bool
{
return $user->can('Create:VisaMasterPaymentOrder');
}
public function update(User $user, VisaMasterPaymentOrder $visaMasterPaymentOrder): bool
{
return $user->can('Update:VisaMasterPaymentOrder');
}
public function delete(User $user, VisaMasterPaymentOrder $visaMasterPaymentOrder): bool
{
return $user->can('Delete:VisaMasterPaymentOrder');
}
public function restore(User $user, VisaMasterPaymentOrder $visaMasterPaymentOrder): bool
{
return $user->can('Restore:VisaMasterPaymentOrder');
}
public function forceDelete(User $user, VisaMasterPaymentOrder $visaMasterPaymentOrder): bool
{
return $user->can('ForceDelete:VisaMasterPaymentOrder');
}
}