All Projects → tonysm → Turbo Laravel

tonysm / Turbo Laravel

Licence: mit
This package gives you a set of conventions to make the most out of Hotwire in Laravel (inspired by the turbo-rails gem).

Labels

Projects that are alternatives of or similar to Turbo Laravel

S Cart
Free Laravel open source e-commerce for business: shopping cart, cms content, and more...
Stars: ✭ 286 (-3.38%)
Mutual labels:  laravel
Assets
An ultra-simple-to-use assets management library for PHP
Stars: ✭ 292 (-1.35%)
Mutual labels:  laravel
Administrator
a fork from Frozennode/Administrator
Stars: ✭ 296 (+0%)
Mutual labels:  laravel
Laravel Google Translate
Translate translation files to other languages using google translate or another translation api
Stars: ✭ 287 (-3.04%)
Mutual labels:  laravel
Laravel Authentication Acl
Laravel authentication and ACL admin panel package based on sentry
Stars: ✭ 292 (-1.35%)
Mutual labels:  laravel
Pyrocms
Pyro is an experienced and powerful Laravel PHP CMS.
Stars: ✭ 3,086 (+942.57%)
Mutual labels:  laravel
Laravel Websockets Demo
Demo application to use with the Laravel WebSockets package.
Stars: ✭ 286 (-3.38%)
Mutual labels:  laravel
Attendize
Attendize is an open-source ticket selling and event management platform built on Laravel.
Stars: ✭ 3,285 (+1009.8%)
Mutual labels:  laravel
Active
Laravel helper for recognising the current route, controller and action.
Stars: ✭ 292 (-1.35%)
Mutual labels:  laravel
Endoflife.date
Informative site with EoL dates of everything
Stars: ✭ 296 (+0%)
Mutual labels:  laravel
Laravel Masterpass
Helps you securely setup a master password and login into user accounts with it.
Stars: ✭ 289 (-2.36%)
Mutual labels:  laravel
Laravel Varnish
Making Varnish and Laravel play nice together
Stars: ✭ 291 (-1.69%)
Mutual labels:  laravel
Nova Permission
A Laravel Nova tool for Spatie's laravel-permission library
Stars: ✭ 294 (-0.68%)
Mutual labels:  laravel
Laravel Vue Admin
开箱即用的Laravel后台扩展,前后端分离,后端控制前端组件,无需编写vue即可创建一个vue+vuex+vue-route+elment-ui+laravel的项目 ,丰富的表单 表格组件,强大的自定义组件功能。
Stars: ✭ 287 (-3.04%)
Mutual labels:  laravel
Laravel Swap
💵 Currency exchange rates for Laravel and Lumen
Stars: ✭ 296 (+0%)
Mutual labels:  laravel
Laravel Deploy On Shared Hosting
The simple guide to deploy Laravel application to shared hosting services.
Stars: ✭ 288 (-2.7%)
Mutual labels:  laravel
Short Url
A Laravel package for creating shortened URLs for your web apps.
Stars: ✭ 293 (-1.01%)
Mutual labels:  laravel
Mailgun
Mailgun package for Laravel
Stars: ✭ 297 (+0.34%)
Mutual labels:  laravel
Laraveltherightway.github.io
Laravel Best Practices (previously Laravel The Right Way)
Stars: ✭ 294 (-0.68%)
Mutual labels:  laravel
Laravel Http2serverpush
A HTTP2 SeverPush Middleware for Laravel 5
Stars: ✭ 294 (-0.68%)
Mutual labels:  laravel

Logo Turbo Laravel

Total Downloads Latest Stable Version License

This package gives you a set of conventions to make the most out of Hotwire in Laravel (inspired by the turbo-rails gem). There is a companion application that shows how to use the package and its conventions in your application.

Installation

You may install the package via composer:

composer require tonysm/turbo-laravel

You may publish the asset files with:

php artisan turbo:install

You may also use Turbo Laravel with Jetstream if you use the Livewire stack. If you want to do so, you may want to publish the assets using the --jet flag:

php artisan turbo:install --jet

The turbo:install command will require and publish a couple JS files to your application. By default, it will add @hotwired/turbo to your package.json file and publish another custom HTML tag to integrate Turbo with Laravel Echo. With the --jet flag, it will also add a couple bridge libs needed to make sure you can use Hotwire with Jetstream, these are:

  • Alpine Turbo Bridge, needed so Alpine.js works nicely; and
  • Livewire Turbo Plugin needed so Livewire works nicely. This one will be added to your Jetstream layouts as script tags fetching from a CDN (both app.blade.php and guest.blade.php)

You may also optionally install Stimulus on top of this all by passing --stimulus flag to the turbo:install command. It's optional because we can either use Alpine.js or Stimulus (or both /shrug):

php artisan turbo:install --jet --stimulus

The package ships with a middleware that applies some conventions on your redirects, specially around how failed validations are redirected automatically by Laravel. To read more about this, check out the Conventions section documentation. You may add the middleware to the "web" route group on your HTTP Kernel, like so:

namespace App\Http;

use Illuminate\Foundation\Http\Kernel as HttpKernel;

class Kernel extends HttpKernel
{
    protected $middlewareGroups = [
        'web' => [
            // ...
            \Tonysm\TurboLaravel\Http\Middleware\TurboMiddleware::class,
        ],
    ];
}

Keep reading the documentation to have a full picture on how you can make the most out of the technique.

Documentation

It's highly recommended reading the Turbo Handbook. Out of everything Turbo provides, it's the Turbo Streams that benefits the most from a tight integration with Laravel. We can generate Turbo Stream from your models and either return them from HTTP responses or broadcast your model changes to all users over WebSockets using Laravel Echo.

Checkout the documentation to see everything that is possible and then try the package.

Closing Notes

Try the package out. Use your Browser's DevTools to inspect the responses. You will be able to spot every single Turbo Frame and Turbo Stream happening.

"The proof of the pudding is in the eating."

Make something awesome!

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Drop me an email at [email protected] if you want to report security vulnerabilities.

License

The MIT License (MIT). Please see License File for more information.

Credits

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].