Skip to content

Commit

Permalink
Better installation instructions in README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
tortuetorche authored Jan 15, 2018
1 parent 699f6ba commit b0535ef
Showing 1 changed file with 7 additions and 15 deletions.
22 changes: 7 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit b0535ef

Please sign in to comment.