Skip to content

Commit

Permalink
- fix
Browse files Browse the repository at this point in the history
  • Loading branch information
EwelinaSkrzypacz committed Oct 1, 2024
1 parent a2d8131 commit 3953af2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app/Http/Controllers/KeysController.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ public function index(Request $request): Response
{
$authUser = $request->user();
$keys = Key::query()
->where(fn(Builder $query): Builder => $query
->whereRelation("user", fn(Builder $query): Builder => $query->withTrashed($authUser->canSeeInactiveUsers()))
->orWhereNull("user_id")
->where(
fn(Builder $query): Builder => $query
->whereRelation("user", fn(Builder $query): Builder => $query->withTrashed($authUser->canSeeInactiveUsers()))
->orWhereNull("user_id"),
)
->with("user")
->get()
Expand Down

0 comments on commit 3953af2

Please sign in to comment.