diff --git a/src/MenuBuilder.php b/src/MenuBuilder.php index f1adb80..a3c7c50 100644 --- a/src/MenuBuilder.php +++ b/src/MenuBuilder.php @@ -349,7 +349,8 @@ public function dropdown($title, \Closure $callback, $order = null, array $attri { $properties = compact('title', 'order', 'attributes'); - if (func_num_args() == 3) { + if (func_num_args() == 3 && is_array($order)) { + // $attributes passed in as 3rd parameter $arguments = func_get_args(); $title = Arr::get($arguments, 0); diff --git a/src/MenuItem.php b/src/MenuItem.php index 00c34ee..1465d4d 100644 --- a/src/MenuItem.php +++ b/src/MenuItem.php @@ -159,7 +159,8 @@ public function dropdown($title, \Closure $callback, $order = 0, array $attribut { $properties = compact('title', 'order', 'attributes'); - if (func_num_args() === 3) { + if (func_num_args() === 3 && is_array($order)) { + // $attributes passed in as third parameter $arguments = func_get_args(); $title = Arr::get($arguments, 0);