Skip to content

Commit b93eda3

Browse files
committed
Update for Laravel 5.8: docs and use Arr::get instead of array_get
1 parent 057ecaf commit b93eda3

File tree

3 files changed

+20
-11
lines changed

3 files changed

+20
-11
lines changed

LEEME.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ Styde Html es una extensión del [paquete HTML de Laravel Collective](https://gi
1313

1414
1. La mejor forma de instalar este paquete es a través de Composer.
1515

16+
**Para Laravel 5.8**:
17+
18+
Instala ejecutando `composer require "styde/html=~1.7"` o agregando `"styde/html": "~1.7"` a tu archivo `composer.json` y luego ejecuta `composer update`.
19+
1620
**Para Laravel 5.7**:
1721

1822
Instala ejecutando `composer require "styde/html=~1.6"` o agregando `"styde/html": "~1.6"` a tu archivo `composer.json` y luego ejecuta `composer update`.
@@ -51,10 +55,10 @@ Instala ejecutando `composer require "styde/html=~1.0"` o agregando `"styde/html
5155
],
5256
```
5357

54-
3. Agrega el middleware `\Styde\Html\Alert\Middleware::class` **ANTES** del middleware `EncryptCookies` que se encuentra en el array `$middleware` (si es Laravel 5.1, 5.2 y 5.3) o en el array `$middlewareGroups` (en Laravel 5.4) del archivo `app/Http/Kernel.php` :
58+
3. Agrega el middleware `\Styde\Html\Alert\Middleware::class` **ANTES** del middleware `EncryptCookies` que se encuentra en el array `$middleware` (si es Laravel 5.1, 5.2 y 5.3) o en el array `$middlewareGroups` (en Laravel 5.4 y posteriores) del archivo `app/Http/Kernel.php` :
5559

5660
```php
57-
// Para Laravel 5.4
61+
// Para Laravel 5.4 y posteriores
5862
protected $middlewareGroups = [
5963
\Styde\Html\Alert\Middleware::class,
6064
//...

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ This is an extension of the Laravel Collective [HTML package](https://github.com
1818

1919
1. The preferred way to install this package is through Composer:
2020

21+
**Laravel 5.8 users**:
22+
23+
Install by running `composer require "styde/html=~1.7"` or adding `"styde/html": "~1.7"` to your `composer.json` file and then running `composer update`.
24+
2125
**Laravel 5.7 users**:
2226

2327
Install by running `composer require "styde/html=~1.6"` or adding `"styde/html": "~1.6"` to your `composer.json` file and then running `composer update`.
@@ -56,10 +60,10 @@ Install by running `composer require "styde/html=~1.0"` or adding `"styde/html":
5660
],
5761
```
5862

59-
3. Also, you need to register in the `app/Http/Kernel.php` file the `\Styde\Html\Alert\Middleware::class` middleware **BEFORE** the `EncryptCookies` middleware. For Laravel 5.4, it's in the `$middlewareGroups` array and for previous versions (Laravel 5.3, 5.2, 5.1) it's in the `$middleware` array:
63+
3. Also, you need to register in the `app/Http/Kernel.php` file the `\Styde\Html\Alert\Middleware::class` middleware **BEFORE** the `EncryptCookies` middleware. For Laravel 5.4 and later, it's in the `$middlewareGroups` array and for previous versions (Laravel 5.3, 5.2, 5.1) it's in the `$middleware` array:
6064

6165
```php
62-
// For Laravel 5.4 and 5.5
66+
// For Laravel 5.4 and later
6367
protected $middlewareGroups = [
6468
\Styde\Html\Alert\Middleware::class,
6569
//...

src/HtmlServiceProvider.php

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,17 @@
22

33
namespace Styde\Html;
44

5-
use Styde\Html\Menu\Menu;
6-
use Styde\Html\Menu\MenuGenerator;
7-
use Styde\Html\Access\AccessHandler;
5+
use Collective\Html\HtmlServiceProvider as ServiceProvider;
6+
use Illuminate\Contracts\Auth\Access\Gate;
87
use Illuminate\Foundation\AliasLoader;
9-
use Styde\Html\Alert\Container as Alert;
8+
use Illuminate\Support\Arr;
9+
use Styde\Html\Access\AccessHandler;
1010
use Styde\Html\Access\BasicAccessHandler;
11-
use Illuminate\Contracts\Auth\Access\Gate;
11+
use Styde\Html\Alert\Container as Alert;
1212
use Styde\Html\Alert\Middleware as AlertMiddleware;
1313
use Styde\Html\Alert\SessionHandler as AlertSessionHandler;
14-
use Collective\Html\HtmlServiceProvider as ServiceProvider;
14+
use Styde\Html\Menu\Menu;
15+
use Styde\Html\Menu\MenuGenerator;
1516

1617
class HtmlServiceProvider extends ServiceProvider
1718
{
@@ -89,7 +90,7 @@ protected function loadConfigurationOptions()
8990

9091
$this->options = $this->app->make('config')->get('html');
9192

92-
$this->options['theme_values'] = array_get($this->options['themes'], $this->options['theme']);
93+
$this->options['theme_values'] = Arr::get($this->options['themes'], $this->options['theme']);
9394

9495
unset ($this->options['themes']);
9596
}

0 commit comments

Comments
 (0)