New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

code-orange/turbolinks-location

Laravel middleware to insert Turbolinks-Location header into every response
47,552 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

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...

665,354,487 9,703
laravel/framework

The Laravel Framework.

633,434,998 35,124
laravel/tinker

Powerful REPL for the Laravel framework.

539,265,140 7,441
laravel/serializable-closure

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

458,029,405 607
nunomaduro/collision

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

431,187,642 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