From b0535efcf149645e538518b325bc12873716f1c1 Mon Sep 17 00:00:00 2001 From: Tortue Torche Date: Mon, 15 Jan 2018 11:29:55 +0100 Subject: [PATCH] Better installation instructions in README.md --- README.md | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index f93e808..52712a6 100644 --- a/README.md +++ b/README.md @@ -28,27 +28,19 @@ CSS. You can find the Rails benchmarks [here](https://stevelabnik/turbolinks_tes ### Using [Composer](https://getcomposer.org) -Add the following in your `composer.json`: - -```json -{ - "require": { - // ... - "frenzy/turbolinks": "dev-master" - } -} -``` - Run this command in a terminal: ```bash -composer update frenzy/turbolinks +composer require frenzy/turbolinks ``` -Add `'Frenzy\Turbolinks\TurbolinksServiceProvider', ` to the `providers` array in `config/app.php`. +Add the Turbolinks middleware, to the `$middlewareGroups` array in `app/Http/Kernel.php`: +```php + \Frenzy\Turbolinks\Middleware\StackTurbolinks::class, +``` -Add the Turbolinks middleware, to the `$middleware` array in `app/Http/Kernel.php`: +**NOTICE**: For Laravel 5.4 and below, you must modify your `config/app.php`, in the `providers` array add : ```php - 'Frenzy\Turbolinks\Middleware\StackTurbolinks', + Frenzy\Turbolinks\TurbolinksServiceProvider::class ``` Add these scripts for automatic publication of assets, in your `composer.json` file: