Online payment

This commit is contained in:
2024-10-14 20:35:30 +05:00
parent b17357d53f
commit 94cc0e2d19
4 changed files with 76 additions and 26 deletions

View File

@@ -0,0 +1,66 @@
<?php
namespace App\Policies;
use App\Models\Payment\OnlinePaymentHistory;
use App\Models\User;
use Illuminate\Auth\Access\Response;
class OnlinePaymentHistoryPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->isAdmin();
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, OnlinePaymentHistory $onlinePaymentHistory): bool
{
return $user->isAdmin();
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return false;
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, OnlinePaymentHistory $onlinePaymentHistory): bool
{
return false;
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, OnlinePaymentHistory $onlinePaymentHistory): bool
{
return false;
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, OnlinePaymentHistory $onlinePaymentHistory): bool
{
return false;
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, OnlinePaymentHistory $onlinePaymentHistory): bool
{
return false;
}
}