Download the PHP package rahmanramsi/livewire-spa without Composer
On this page you can find all versions of the php package rahmanramsi/livewire-spa. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download rahmanramsi/livewire-spa
More information about rahmanramsi/livewire-spa
Files in rahmanramsi/livewire-spa
Package livewire-spa
Short Description SPA for Laravel Livewire
License MIT
Homepage https://github.com/rahmanramsi/livewire-spa
Informations about the package livewire-spa
Create SPA using Laravel Livewire
A wrapper for making SPA using Laravel Livewire.
Requirements
- PHP 8.x or higher
- Livewire 2.x or higher
Installation
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
Add {{ slot }}
inside the body, and add the following Blade directives in the head
tag, and before the end body
tag in your template.
Publishing The Config File
This is the contents of the published config file:
Usage
Creating Page
You can create a page by using the following command:
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:
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
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
- [ ] Write the test
- [ ] Demo Page
- [ ] Documentation Page
- [ ] Starterpack
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Rahman Ramsi
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of livewire-spa with dependencies
livewire/livewire Version ^2.10
spatie/laravel-package-tools Version ^1.9.2