Replies: 1 comment
-
|
Go to the boostrap/app.php file and on the withExceptions() function, add a handler for HTTP exceptions, like this: Then do whatever you want with this flash data. I added it to the shared Inertia data on app/Http/Middleware/HandleInertiaRequests.php This shared data is available on the Inertia font-end side. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey stupid question, but I'm not sure how to handle this correctly.
I have installed Laravel Jetstream with Inertia and added a middleware for the deletion of a user.
Now in my UserPolicy I have added:
How can I combine Inertia with Laravel Policy?
Currently, I'm just getting a 403 modal popup.
Thank you 🤗
Edit:
Ok I could just use "can" like here https://inertiajs.com/authorization, but I hoped for a more lazy approach. Similar like in validation 😅
Beta Was this translation helpful? Give feedback.
All reactions