saakiiib/laravel-spa — reverse-engineered prompt
Reverse engineered prompt
Build me a Laravel package that makes normal Blade apps feel like a zero reload SPA without making me switch away from Blade. I want it to work with both classic @extends and @section layouts and also x layout components. The idea is that I can mark a content area with @spaContent, include an engine with @spaEngine, add @spa to links I want handled this way, and return views from controllers with a simple spa() helper.
When someone clicks one of those links, only the page content should swap, while the URL, browser history, back and forward buttons, refresh, and direct visits still work normally. Per page styles and scripts should load and unload correctly on navigation, session expiry should redirect cleanly, and hover prefetch would be great so pages feel instant.
Please make it easy to install in a real Laravel app, include published frontend assets if needed, and write a clear README with quick start instructions and examples. Look up current Laravel docs if you need to.
Want more depth? Deep Reverse