ledgerrz/app/Policies/ChatPolicy.php
Daan Meijer b2a7e2557e
Some checks failed
linter / quality (push) Failing after 1m5s
tests / ci (8.3) (push) Failing after 51s
tests / ci (8.4) (push) Failing after 1m6s
tests / ci (8.5) (push) Failing after 1m7s
dashboard gereparerd
2026-07-06 15:53:30 +02:00

68 lines
1.3 KiB
PHP

<?php
namespace App\Policies;
use App\Models\Chat;
use App\Models\User;
use Illuminate\Auth\Access\Response;
class ChatPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return false;
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, Chat $chat): bool
{
$chatable = $chat->chatable;
return $user->can('view', $chatable);
}
/**
* 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, Chat $chat): bool
{
return $this->view($user, $chat);
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, Chat $chat): bool
{
return false;
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, Chat $chat): bool
{
return false;
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, Chat $chat): bool
{
return false;
}
}