Skip to content

Commit

Permalink
#405 - inertia tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
krzysztofrewak committed Apr 3, 2024
1 parent 1a85336 commit 232fa7e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Http/Middleware/HandleInertiaRequests.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ protected function getAuthData(Request $request): Closure
$user = $request->user()?->load("profile");

return fn(): array => [
"user" => $user ?? new UserResource($user),
"user" => $user ? new UserResource($user) : null,
"can" => Permission::query()->with("roles")->get()
->mapWithKeys(
fn(Permission $permission): array => [
Expand Down

0 comments on commit 232fa7e

Please sign in to comment.