inertia-laravel
inertia-laravel copied to clipboard
inertia laravel opens the page in a new modal
I have a problem with inertia and laravel. After updating files on the server, it sometimes happens that when switching between pages, the page will open in a new modal window. I don't know exactly what the problem is, but I think it's related to the cache and Laravel Mix and using webpack mix.version() in production?
I think it's related to the cache and Laravel Mix and using webpack mix.version() in production?
It isn't. If you're seeing a modal in inertia, it's because you're sending a request for an Inertia page from the browser, but the server is sending back a standard HTML response.
Ensure that you have the Inertia Middleware installed properly and that it's applied on all relevant routes.
Furthermore, make sure that your controllers are returning either an inertia response or a redirection to an inertia response (e.g. return back();
)
If you nail down the pages where the modal opens, this should help you track down the controller methods/routes where the issues are.