77use Illuminate \Contracts \Support \Arrayable as ArrayableContract ;
88use Illuminate \Support \Arr ;
99use Illuminate \Support \Facades \Request ;
10+ use Illuminate \Support \Str ;
1011
1112/**
1213 * @property string url
@@ -101,7 +102,7 @@ protected static function setIconAttribute(array $properties)
101102 */
102103 protected static function getRandomName (array $ attributes )
103104 {
104- return substr (md5 (array_get ($ attributes , 'title ' , str_random (6 ))), 0 , 5 );
105+ return substr (md5 (Arr:: get ($ attributes , 'title ' , Str:: random (6 ))), 0 , 5 );
105106 }
106107
107108 /**
@@ -161,8 +162,8 @@ public function dropdown($title, \Closure $callback, $order = 0, array $attribut
161162 if (func_num_args () === 3 ) {
162163 $ arguments = func_get_args ();
163164
164- $ title = array_get ($ arguments , 0 );
165- $ attributes = array_get ($ arguments , 2 );
165+ $ title = Arr:: get ($ arguments , 0 );
166+ $ attributes = Arr:: get ($ arguments , 2 );
166167
167168 $ properties = compact ('title ' , 'attributes ' );
168169 }
@@ -192,9 +193,9 @@ public function route($route, $title, $parameters = array(), $order = 0, $attrib
192193 $ arguments = func_get_args ();
193194
194195 return $ this ->add ([
195- 'route ' => [array_get ($ arguments , 0 ), array_get ($ arguments , 2 )],
196- 'title ' => array_get ($ arguments , 1 ),
197- 'attributes ' => array_get ($ arguments , 3 ),
196+ 'route ' => [Arr:: get ($ arguments , 0 ), Arr:: get ($ arguments , 2 )],
197+ 'title ' => Arr:: get ($ arguments , 1 ),
198+ 'attributes ' => Arr:: get ($ arguments , 3 ),
198199 ]);
199200 }
200201
@@ -218,9 +219,9 @@ public function url($url, $title, $order = 0, $attributes = array())
218219 $ arguments = func_get_args ();
219220
220221 return $ this ->add ([
221- 'url ' => array_get ($ arguments , 0 ),
222- 'title ' => array_get ($ arguments , 1 ),
223- 'attributes ' => array_get ($ arguments , 2 ),
222+ 'url ' => Arr:: get ($ arguments , 0 ),
223+ 'title ' => Arr:: get ($ arguments , 1 ),
224+ 'attributes ' => Arr:: get ($ arguments , 2 ),
224225 ]);
225226 }
226227
@@ -507,7 +508,7 @@ public function inactive()
507508 */
508509 public function getActiveAttribute ()
509510 {
510- return array_get ($ this ->attributes , 'active ' );
511+ return Arr:: get ($ this ->attributes , 'active ' );
511512 }
512513
513514 /**
@@ -517,7 +518,7 @@ public function getActiveAttribute()
517518 */
518519 public function getInactiveAttribute ()
519520 {
520- return array_get ($ this ->attributes , 'inactive ' );
521+ return Arr:: get ($ this ->attributes , 'inactive ' );
521522 }
522523
523524 /**
0 commit comments