First Commit
This commit is contained in:
Executable
+21
@@ -0,0 +1,21 @@
|
||||
<?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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user