first commit

This commit is contained in:
2026-05-14 15:28:23 +08:00
commit 4fad704fd2
4034 changed files with 1093582 additions and 0 deletions

View File

@@ -0,0 +1,71 @@
<?php
namespace App\Policies;
use App\Models\LesenPenjaja;
use App\Models\User;
use App\Models\UserPolicies;
use Illuminate\Auth\Access\Response;
class LesenPenjajaPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
//
return UserPolicies::where('user_id', $user)->where('modul', 'penjaja')->exists();
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, LesenPenjaja $lesenPenjaja): bool
{
//
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
//
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, LesenPenjaja $lesenPenjaja): bool
{
//
return UserPolicies::where('user_id', $user)->where('modul', 'penjaja')->where('akses', 'jana wang proses')->exists();
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, LesenPenjaja $lesenPenjaja): bool
{
//
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, LesenPenjaja $lesenPenjaja): bool
{
//
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, LesenPenjaja $lesenPenjaja): bool
{
//
}
}