-
-
Save beberlei/5eae81464da40b92b61b52e1d6e9784c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "extra": { | |
| "laravel": { | |
| "dont-discover": [] | |
| }, | |
| "patches": { | |
| "laravel/jetstream": { | |
| "Check Session available before accessing": "patches/laravel-jetstream-sessioncheck.patch" | |
| } | |
| } | |
| }, | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- a/src/Http/Middleware/ShareInertiaData.php | |
| +++ b/src/Http/Middleware/ShareInertiaData.php | |
| @@ -19,6 +19,10 @@ class ShareInertiaData | |
| */ | |
| public function handle($request, $next) | |
| { | |
| + if (!$request->hasSession()) { | |
| + return $next($request); | |
| + } | |
| + | |
| Inertia::share(array_filter([ | |
| 'jetstream' => function () use ($request) { | |
| $user = $request->user(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment