PHPackages                             rahmanramsi/livewire-spa - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. rahmanramsi/livewire-spa

AbandonedArchivedLibrary[Framework](/categories/framework)

rahmanramsi/livewire-spa
========================

SPA for Laravel Livewire

0.0.5(4y ago)421[1 issues](https://github.com/rahmanramsi/livewire-spa/issues)MITPHPPHP ^8.0

Since Feb 20Pushed 4y ago1 watchersCompare

[ Source](https://github.com/rahmanramsi/livewire-spa)[ Packagist](https://packagist.org/packages/rahmanramsi/livewire-spa)[ Docs](https://github.com/rahmanramsi/livewire-spa)[ RSS](/packages/rahmanramsi-livewire-spa/feed)WikiDiscussions main Synced 4w ago

READMEChangelog (5)Dependencies (2)Versions (7)Used By (0)

Create SPA using Laravel Livewire
=================================

[](#create-spa-using-laravel-livewire)

[![Latest Version on Packagist](https://camo.githubusercontent.com/5afa3fd05c9a5a02db87c75a67e2266f154069ce990131bc0f176af0c04605a3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7261686d616e72616d73692f6c697665776972652d7370612e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rahmanramsi/livewire-spa)[![Total Downloads](https://camo.githubusercontent.com/56abd9f9dd571112886e73e550409a13187263ec22619d71a31a12fdcad236b1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7261686d616e72616d73692f6c697665776972652d7370612e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rahmanramsi/livewire-spa)

A wrapper for making SPA using Laravel Livewire.

Requirements
============

[](#requirements)

1. PHP 8.x or higher
2. Livewire 2.x or higher

Installation
============

[](#installation)

```
composer require rahmanramsi/livewire-spa
```

Configuring The Layout Component
--------------------------------

[](#configuring-the-layout-component)

By default, LivewireSpa will render Page Component into the `{{ $slot }}` of a blade layout component located at: `resources/views/layouts/app.blade.php`

You must create `resources/views/layouts/app.blade.php` file first and add your custom layout there.

Include The Assets
------------------

[](#include-the-assets)

Add `{{ slot }}` inside the body, and add the following Blade directives in the `head` tag, and before the end `body` tag in your template.

```

    ...
    @livewireStyles
    @livewireSpaStyles

    {{ $slot }}

    @livewireScripts
    @livewireSpaScripts

```

Publishing The Config File
--------------------------

[](#publishing-the-config-file)

```
php artisan vendor:publish --tag="livewire-spa-config"
```

This is the contents of the published config file:

```
return [

  'path' => 'spa',

  'layout' => 'layouts.app',

  'single_page' => \Rahmanramsi\LivewireSpa\Http\Livewire\SinglePage::class,

  'pages' => [
    'default' => null,
    'error' => \Rahmanramsi\LivewireSpa\Http\Livewire\Pages\ErrorPage::class,
    'namespace' => 'App\\Http\\LivewireSpa',
    'path' => app_path('Http/LivewireSpa'),
    'register' => [],
  ],

  'middleware' => ['web'],

  'livewire' => [
    'namespace' => 'App\\Http\\LivewireSpa',
    'path' => app_path('Http/LivewireSpa'),
  ],
];
```

Usage
=====

[](#usage)

Creating Page
-------------

[](#creating-page)

You can create a page by using the following command:

```
php artisan make:livewire-spa PageName
```

Two new files were created in your project:

`app\LivewireSpa\PageName.php`

`resources\views\livewire-spa\page-name.blade.php`

If you wish to create Page within sub-folders, you can use the following different syntaxes:

```
php artisan make:livewire-spa SubFolder/PageName
```

Now, the two created files will be in sub-folders:

`app\LivewireSpa\SubFolder\PageName.php`

`resources\views\livewire-spa\sub-folder\page-name.blade.php`

Navigate Between Page
---------------------

[](#navigate-between-page)

Just use default `a[href]` tag, it will automatically detect it. If you don't want LivewireSpa to prevent the default behavior, just add `native` attribute to `a` tag.

Roadmap
=======

[](#roadmap)

- Write the test
- Demo Page
- Documentation Page
- Starterpack

Contributing
============

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
========================

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
=======

[](#credits)

- [Rahman Ramsi](https://github.com/rahmanramsi)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

22

—

LowBetter than 23% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~6 days

Total

5

Last Release

1514d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b3e789cc6cda4e2a255811af4d8284ab659c40e07262f6edb70d2116cd600939?d=identicon)[rhmrms](/maintainers/rhmrms)

---

Top Contributors

[![rahmanramsi](https://avatars.githubusercontent.com/u/48276043?v=4)](https://github.com/rahmanramsi "rahmanramsi (10 commits)")

---

Tags

livewire

### Embed Badge

![Health badge](/badges/rahmanramsi-livewire-spa/health.svg)

```
[![Health](https://phpackages.com/badges/rahmanramsi-livewire-spa/health.svg)](https://phpackages.com/packages/rahmanramsi-livewire-spa)
```

###  Alternatives

[lunarstorm/laravel-ddd

A Laravel toolkit for Domain Driven Design patterns

17959.0k](/packages/lunarstorm-laravel-ddd)[shipu/web-installer

Laravel Web Installer

724.0k1](/packages/shipu-web-installer)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
