code-orange/turbolinks-location

Laravel middleware to insert Turbolinks-Location header into every response
46,660 14
Install
composer require code-orange/turbolinks-location
Latest Version:v1.3
Laravel:5 · 6 · 7
License:Apache-2.0
Last Updated:Apr 6, 2020
Links: GitHub  ·  Packagist
Maintainer: timvdalen

Turbolinks Location middleware for Laravel

This package contains a Laravel middleware for working with Turbolinks. It sets the Turbolinks-Location header on every response served, so that Turbolinks always shows the correct URL after redirects.

Installation

composer require code-orange/turbolinks-location

Usage

In your App\Http\Kernel, add the middleware to your web group:

use CodeOrange\TurbolinksLocation\TurbolinksLocation;

class Kernel extends HttpKernel {
    protected $middlewareGroups = [
        'web' => [
            ...,
            TurbolinksLocation::class
        ],
    ];
}

That's it! All requests to routes in your web.php route file will now be served with a correct Turbolinks-Location header.

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

644,549,754 9,698
laravel/framework

The Laravel Framework.

598,760,099 34,966
laravel/tinker

Powerful REPL for the Laravel framework.

507,193,856 7,441
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

423,477,751 607
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

399,241,428 4,660

Version History

Version Released Laravel License
v1.3 >=5.2 Apache-2.0
v1.2 >=5.2 Apache-2.0
v1.1 ~5.2 Apache-2.0
v1.0 ~5.2 Apache-2.0