- 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.
50 lines
1.2 KiB
PHP
50 lines
1.2 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Modules\OnlinePayment\Policies;
|
|
|
|
use App\Models\User;
|
|
use App\Modules\OnlinePayment\Models\OnlinePayment;
|
|
use Illuminate\Auth\Access\HandlesAuthorization;
|
|
|
|
class OnlinePaymentPolicy
|
|
{
|
|
use HandlesAuthorization;
|
|
|
|
public function viewAny(User $user): bool
|
|
{
|
|
return $user->can('ViewAny:OnlinePayment');
|
|
}
|
|
|
|
public function view(User $user, OnlinePayment $onlinePayment): bool
|
|
{
|
|
return $user->can('View:OnlinePayment');
|
|
}
|
|
|
|
public function create(User $user): bool
|
|
{
|
|
return $user->can('Create:OnlinePayment');
|
|
}
|
|
|
|
public function update(User $user, OnlinePayment $onlinePayment): bool
|
|
{
|
|
return $user->can('Update:OnlinePayment');
|
|
}
|
|
|
|
public function delete(User $user, OnlinePayment $onlinePayment): bool
|
|
{
|
|
return $user->can('Delete:OnlinePayment');
|
|
}
|
|
|
|
public function restore(User $user, OnlinePayment $onlinePayment): bool
|
|
{
|
|
return $user->can('Restore:OnlinePayment');
|
|
}
|
|
|
|
public function forceDelete(User $user, OnlinePayment $onlinePayment): bool
|
|
{
|
|
return $user->can('ForceDelete:OnlinePayment');
|
|
}
|
|
}
|