Files
dockerank2/app/Policies/UserInterestPolicy.php
T
2026-09-01 07:49:48 -03:00

22 lines
413 B
PHP
Executable File

<?php
namespace App\Policies;
use App\Models\User;
use App\Models\UserInterest;
use Illuminate\Auth\Access\HandlesAuthorization;
/**
* Policy for UserInterest model.
*/
class UserInterestPolicy
{
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, UserInterest $userInterest): bool
{
return $user->id === $userInterest->user_id;
}
}