formatting, juiste use voor UpdateDynamicRequest
This commit is contained in:
@@ -30,14 +30,14 @@ class ParticipantController extends Controller
|
||||
public function show(Request $request, Dynamic $dynamic, User $user)
|
||||
{
|
||||
// Ensure both the authenticated user and the target user are in the dynamic
|
||||
if (!$dynamic->participants()->where('user_id', $request->user()->id)->exists()) {
|
||||
if (! $dynamic->participants()->where('user_id', $request->user()->id)->exists()) {
|
||||
abort(403);
|
||||
}
|
||||
|
||||
$participant = $dynamic->participants()->where('user_id', $user->id)->firstOrFail();
|
||||
|
||||
$mutations = $user->mutations()
|
||||
->whereHas('ledger', fn($query) => $query->where('dynamic_id', $dynamic->id))
|
||||
->whereHas('ledger', fn ($query) => $query->where('dynamic_id', $dynamic->id))
|
||||
->with('ledger')
|
||||
->latest('id')
|
||||
->take(10)
|
||||
@@ -54,5 +54,4 @@ class ParticipantController extends Controller
|
||||
'mutations' => $mutations,
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user