Currently the baseUrl option is only working as a fallback option i.e. when the modal url is accessed directly from the browser's address bar.
This PR adds an option to force the base page to render even if the request is an inertia request (my use case is for a page that is protected by the auth middleware but the modal is not).
Usage:
return Inertia::modal('Tweets/Show')
->baseRoute('tweets.index')
->forceBase();
// or pass in a boolean
$shouldForce = request()->header('referer') !== 'https://example.com/tweets/create';
return Inertia::modal('Tweets/Show')
->baseRoute('tweets.index')
->forceBase($shouldForce);
Currently the
baseUrl
option is only working as a fallback option i.e. when the modal url is accessed directly from the browser's address bar.This PR adds an option to force the base page to render even if the request is an inertia request (my use case is for a page that is protected by the auth middleware but the modal is not).
Usage: