Initial commit
This commit is contained in:
26
app/Policies/CtyPolicy.php
Normal file
26
app/Policies/CtyPolicy.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace App\Policies;
|
||||
|
||||
use App\Models\Cty;
|
||||
use App\Models\User;
|
||||
use Illuminate\Auth\Access\Response;
|
||||
|
||||
class CtyPolicy
|
||||
{
|
||||
|
||||
public function create(User $user): bool
|
||||
{
|
||||
return (bool) $user->is_admin;
|
||||
}
|
||||
|
||||
public function update(User $user, Cty $cty): bool
|
||||
{
|
||||
return (bool) $user->is_admin;
|
||||
}
|
||||
|
||||
public function delete(User $user, Cty $cty): bool
|
||||
{
|
||||
return (bool) $user->is_admin;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user