diff --git a/composer.json b/composer.json index ca181e9..8a0f1ea 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,13 @@ { "name": "akaunting/menu", "description": "Menu and sidebar management package for Laravel.", - "keywords": ["laravel", "menu", "navigation", "sidebar", "bootstrap"], + "keywords": [ + "laravel", + "menu", + "navigation", + "sidebar", + "bootstrap" + ], "license": "MIT", "authors": [ { @@ -13,10 +19,10 @@ ], "require": { "php": ">=7.1", - "illuminate/config": ">=5.5 <6.0", - "illuminate/support": ">=5.5 <6.0", - "illuminate/view": ">=5.5 <6.0", - "laravelcollective/html": ">=5.5 <6.0" + "illuminate/config": ">=5.5", + "illuminate/support": ">=5.5", + "illuminate/view": ">=5.5", + "laravelcollective/html": ">=5.5" }, "require-dev": { "friendsofphp/php-cs-fixer": "^2.10", diff --git a/src/MenuItem.php b/src/MenuItem.php index 01de2c5..1670f7b 100644 --- a/src/MenuItem.php +++ b/src/MenuItem.php @@ -6,6 +6,7 @@ use Collective\Html\HtmlFacade as HTML; use Illuminate\Contracts\Support\Arrayable as ArrayableContract; use Illuminate\Support\Facades\Request; +use Illuminate\Support\Str; /** * @property string url @@ -100,7 +101,7 @@ protected static function setIconAttribute(array $properties) */ protected static function getRandomName(array $attributes) { - return substr(md5(array_get($attributes, 'title', str_random(6))), 0, 5); + return substr(md5(array_get($attributes, 'title', Str::random(6))), 0, 5); } /** diff --git a/src/Presenters/Bootstrap3/Sidebar.php b/src/Presenters/Bootstrap3/Sidebar.php index e5093e0..699d3e5 100644 --- a/src/Presenters/Bootstrap3/Sidebar.php +++ b/src/Presenters/Bootstrap3/Sidebar.php @@ -3,6 +3,7 @@ namespace Akaunting\Menu\Presenters\Bootstrap3; use Akaunting\Menu\Presenters\Presenter; +use Illuminate\Support\Str; class Sidebar extends Presenter { @@ -82,7 +83,7 @@ public function getHeaderWrapper($item) */ public function getMenuWithDropDownWrapper($item) { - $id = str_random(); + $id = Str::random(); return '