rajentrivedi / laravel-spa
This package is abandoned and no longer maintained.
No replacement package was suggested.
Convert Normal Laravel App in to SPA
dev-main
2022-04-12 02:45 UTC
This package is auto-updated.
Last update: 2024-01-01 11:33:48 UTC
README
Convert Normal Laravel App in to SPA
Installation
composer require rajentrivedi/laravel-spa
You need to use following blade directive in to head section of your master blade file, where you load all your assests.
@spa
Example
<!DOCTYPE html>
<html lang="en">
<head>
@spa
</head>
</html>
Blade directives to write javascript code.
@spascript
$('#your_id').click(function(){
console.log('working');
})
@endspascript
If you want to disable spa for perticular link.
@disablespa
Example
<a href="{{route('excel.download')}}" class="btn btn-primary btn-md m-5" @disablespa>Excel</a>
This package will increase the page load speed, as this package is using Tubolinks.
That's all, you need not to do anything else.