Looking to hire Laravel developers? Try LaraJobs

laravel-spa maintained by anascloud

Description
A framework-agnostic Single Page Application (SPA) engine for Laravel with zero configuration.
Last update
2026/12/02 12:12 (dev-main)
License
Links
Downloads
0

Comments
comments powered by Disqus

Laravel SPA

Turn your Laravel Blade app into a single page app. Zero configuration.

A lightweight, zero-configuration SPA navigation engine for Laravel that transforms traditional server-rendered applications into seamless Single Page Applications. Enjoy fast, app-like navigation without React, Vue, Angular, or any frontend framework. Keep your existing Laravel Blade views, routes, controllers, and development workflow—just install and experience SPA-like performance with minimal effort.

Installation

  1. composer require anascloud/laravel-spa
  2. php artisan vendor:publish --tag=spa-assets

That's it: no config, no layout changes. Requires PHP 8.1+ and Laravel 10, 11 or 12.

Usage

It works automatically. To run code on every page, use spa:load instead of DOMContentLoaded:

document.addEventListener('spa:load', () => { /* runs on first load and after every navigation */ });

Skip a link or form with data-no-spa, navigate from JS with Spa.visit('/url').