Skip to content

Commit dab3a69

Browse files
authored
Merge pull request #1 from stevelacey/swap-out-deprecated-array-helpers
Swap out deprecated array helpers
2 parents fe8a5e6 + 04b3e54 commit dab3a69

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

src/Menu.php

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

33
namespace Shrft\AdminBar;
44

5+
use Illuminate\Support\Arr;
6+
57
class Menu
68
{
79
/**
@@ -87,12 +89,15 @@ public function getOptions()
8789
protected function createMenuOptions($options)
8890
{
8991
$menuOptions = [];
92+
9093
foreach ($options as $option) {
9194
if (is_array($option['path'])) {
92-
$menuOptions[] = new Menu($this->request, $option['path'], array_get($option, 'filter'), $option['title']);
95+
$menuOptions[] = new Menu($this->request, $option['path'], Arr::get($option, 'filter'), $option['title']);
96+
9397
continue;
9498
}
95-
$menuOptions[] = new MenuOption($this->request, $option['title'], $option['path'], array_get($option, 'filter'));
99+
100+
$menuOptions[] = new MenuOption($this->request, $option['title'], $option['path'], Arr::get($option, 'filter'));
96101
}
97102

98103
return collect($menuOptions);

0 commit comments

Comments
 (0)