@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | { |
| 93 | 93 | $class = get_called_class(); |
| 94 | 94 | |
| 95 | - if (! isset(self::$instance[$class]) || ! self::$instance[$class] instanceof $class) { |
|
| 95 | + if (!isset(self::$instance[$class]) || !self::$instance[$class] instanceof $class) { |
|
| 96 | 96 | self::$instance[$class] = new static(); |
| 97 | 97 | } |
| 98 | 98 | |
@@ -112,11 +112,11 @@ discard block |
||
| 112 | 112 | return false; |
| 113 | 113 | } |
| 114 | 114 | |
| 115 | - if (! empty($css = $extension->css())) { |
|
| 115 | + if (!empty($css = $extension->css())) { |
|
| 116 | 116 | Admin::css($css); |
| 117 | 117 | } |
| 118 | 118 | |
| 119 | - if (! empty($js = $extension->js())) { |
|
| 119 | + if (!empty($js = $extension->js())) { |
|
| 120 | 120 | Admin::js($js); |
| 121 | 121 | } |
| 122 | 122 | |
@@ -206,7 +206,7 @@ discard block |
||
| 206 | 206 | */ |
| 207 | 207 | public function disabled() |
| 208 | 208 | { |
| 209 | - return ! $this->enabled(); |
|
| 209 | + return !$this->enabled(); |
|
| 210 | 210 | } |
| 211 | 211 | |
| 212 | 212 | /** |
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | public static function import() |
| 237 | 237 | { |
| 238 | 238 | $extension = static::getInstance(); |
| 239 | - DB::transaction(function () use ($extension) { |
|
| 239 | + DB::transaction(function() use ($extension) { |
|
| 240 | 240 | if ($menu = $extension->menu()) { |
| 241 | 241 | if ($extension->validateMenu($menu)) { |
| 242 | 242 | extract($menu); |
@@ -309,7 +309,7 @@ discard block |
||
| 309 | 309 | */ |
| 310 | 310 | public function validatePermission(array $permission) |
| 311 | 311 | { |
| 312 | - if (! empty($permission['method'])) { |
|
| 312 | + if (!empty($permission['method'])) { |
|
| 313 | 313 | $permission['method'] = array_map('strtoupper', $permission['method']); |
| 314 | 314 | } |
| 315 | 315 | |
@@ -370,7 +370,7 @@ discard block |
||
| 370 | 370 | 'icon' => $icon, |
| 371 | 371 | 'uri' => $uri, |
| 372 | 372 | ]); |
| 373 | - if (! empty($children)) { |
|
| 373 | + if (!empty($children)) { |
|
| 374 | 374 | $extension = static::getInstance(); |
| 375 | 375 | foreach ($children as $child) { |
| 376 | 376 | if ($extension->validateMenu($child)) { |
@@ -26,10 +26,10 @@ discard block |
||
| 26 | 26 | return $content |
| 27 | 27 | ->title(trans('admin.menu')) |
| 28 | 28 | ->description(trans('admin.list')) |
| 29 | - ->row(function (Row $row) { |
|
| 29 | + ->row(function(Row $row) { |
|
| 30 | 30 | $row->column(6, $this->treeView()->render()); |
| 31 | 31 | |
| 32 | - $row->column(6, function (Column $column) { |
|
| 32 | + $row->column(6, function(Column $column) { |
|
| 33 | 33 | $form = new \Encore\Admin\Widgets\Form(); |
| 34 | 34 | $form->action(admin_url('auth/menu')); |
| 35 | 35 | |
@@ -71,13 +71,13 @@ discard block |
||
| 71 | 71 | { |
| 72 | 72 | $menuModel = config('admin.database.menu_model'); |
| 73 | 73 | |
| 74 | - return $menuModel::tree(function (Tree $tree) { |
|
| 74 | + return $menuModel::tree(function(Tree $tree) { |
|
| 75 | 75 | $tree->disableCreate(); |
| 76 | 76 | |
| 77 | - $tree->branch(function ($branch) { |
|
| 77 | + $tree->branch(function($branch) { |
|
| 78 | 78 | $payload = "<i class='{$branch['icon']}'></i> <strong>{$branch['title']}</strong>"; |
| 79 | 79 | |
| 80 | - if (! isset($branch['children'])) { |
|
| 80 | + if (!isset($branch['children'])) { |
|
| 81 | 81 | if (url()->isValidUrl($branch['uri'])) { |
| 82 | 82 | $uri = $branch['uri']; |
| 83 | 83 | } else { |