added media, mutation events, agent instructions
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Policies;
|
||||
|
||||
use App\Models\Mutation;
|
||||
use App\Models\User;
|
||||
|
||||
class MutationPolicy
|
||||
{
|
||||
/**
|
||||
* Determine whether the user can view the mutation.
|
||||
*/
|
||||
public function view(User $user, Mutation $mutation): bool
|
||||
{
|
||||
$dynamic = $mutation->ledger->dynamic;
|
||||
|
||||
return $dynamic->participants()->where('user_id', $user->id)->exists();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user