@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | */ |
58 | 58 | public function getModelConfiguration() |
59 | 59 | { |
60 | - if (! $this->hasModel()) { |
|
60 | + if (!$this->hasModel()) { |
|
61 | 61 | return; |
62 | 62 | } |
63 | 63 | |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | */ |
70 | 70 | public function hasModel() |
71 | 71 | { |
72 | - return ! is_null($this->model) && class_exists($this->model); |
|
72 | + return !is_null($this->model) && class_exists($this->model); |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | /** |
@@ -113,9 +113,9 @@ discard block |
||
113 | 113 | */ |
114 | 114 | public function getAccessLogic() |
115 | 115 | { |
116 | - if (! is_callable($this->accessLogic)) { |
|
116 | + if (!is_callable($this->accessLogic)) { |
|
117 | 117 | if ($this->hasModel()) { |
118 | - return function () { |
|
118 | + return function() { |
|
119 | 119 | return $this->getModelConfiguration()->isDisplayable(); |
120 | 120 | }; |
121 | 121 | } |
@@ -131,13 +131,13 @@ discard block |
||
131 | 131 | */ |
132 | 132 | public function render($view = null) |
133 | 133 | { |
134 | - if ($this->hasChild() && ! $this->hasClassProperty($class = config('navigation.class.has_child', 'treeview'))) { |
|
134 | + if ($this->hasChild() && !$this->hasClassProperty($class = config('navigation.class.has_child', 'treeview'))) { |
|
135 | 135 | $this->setHtmlAttribute('class', $class); |
136 | 136 | } |
137 | 137 | |
138 | 138 | $data = $this->toArray(); |
139 | 139 | |
140 | - if (! is_null($view)) { |
|
140 | + if (!is_null($view)) { |
|
141 | 141 | return view($view, $data)->render(); |
142 | 142 | } |
143 | 143 |
@@ -64,20 +64,20 @@ discard block |
||
64 | 64 | { |
65 | 65 | parent::initialize(); |
66 | 66 | |
67 | - $this->buttons->put('edit', $button = new ControlLink(function (Model $model) { |
|
67 | + $this->buttons->put('edit', $button = new ControlLink(function(Model $model) { |
|
68 | 68 | return $this->getModelConfiguration()->getEditUrl($model->getKey()); |
69 | 69 | }, trans('sleeping_owl::lang.table.edit'), 100)); |
70 | 70 | $button->hideText(); |
71 | - $button->setCondition(function () { |
|
71 | + $button->setCondition(function() { |
|
72 | 72 | return $this->isEditable(); |
73 | 73 | }); |
74 | 74 | $button->setIcon('fa fa-pencil'); |
75 | 75 | $button->setHtmlAttribute('class', 'btn-primary'); |
76 | 76 | |
77 | - $this->buttons->put('delete', $button = new ControlButton(function (Model $model) { |
|
77 | + $this->buttons->put('delete', $button = new ControlButton(function(Model $model) { |
|
78 | 78 | return $this->getModelConfiguration()->getDeleteUrl($model->getKey()); |
79 | 79 | }, trans('sleeping_owl::lang.table.delete'), 200)); |
80 | - $button->setCondition(function () { |
|
80 | + $button->setCondition(function() { |
|
81 | 81 | return $this->isDeletable(); |
82 | 82 | }); |
83 | 83 | |
@@ -86,10 +86,10 @@ discard block |
||
86 | 86 | $button->setIcon('fa fa-trash'); |
87 | 87 | $button->setHtmlAttribute('class', 'btn-danger btn-delete'); |
88 | 88 | |
89 | - $this->buttons->put('destroy', $button = new ControlButton(function (Model $model) { |
|
89 | + $this->buttons->put('destroy', $button = new ControlButton(function(Model $model) { |
|
90 | 90 | return $this->getModelConfiguration()->getDestroyUrl($model->getKey()); |
91 | 91 | }, trans('sleeping_owl::lang.table.destroy'), 300)); |
92 | - $button->setCondition(function () { |
|
92 | + $button->setCondition(function() { |
|
93 | 93 | return $this->isDestroyable(); |
94 | 94 | }); |
95 | 95 | |
@@ -98,10 +98,10 @@ discard block |
||
98 | 98 | $button->setIcon('fa fa-trash'); |
99 | 99 | $button->setHtmlAttribute('class', 'btn-danger btn-destroy'); |
100 | 100 | |
101 | - $this->buttons->put('restore', $button = new ControlButton(function (Model $model) { |
|
101 | + $this->buttons->put('restore', $button = new ControlButton(function(Model $model) { |
|
102 | 102 | return $this->getModelConfiguration()->getRestoreUrl($model->getKey()); |
103 | 103 | }, trans('sleeping_owl::lang.table.restore'), 400)); |
104 | - $button->setCondition(function () { |
|
104 | + $button->setCondition(function() { |
|
105 | 105 | return $this->isRestorable(); |
106 | 106 | }); |
107 | 107 | $button->hideText(); |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | return |
206 | 206 | $this->editable |
207 | 207 | && |
208 | - ! $this->isTrashed() |
|
208 | + !$this->isTrashed() |
|
209 | 209 | && |
210 | 210 | $this->getModelConfiguration()->isEditable( |
211 | 211 | $this->getModel() |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | return |
223 | 223 | $this->deletable |
224 | 224 | && |
225 | - ! $this->isTrashed() |
|
225 | + !$this->isTrashed() |
|
226 | 226 | && |
227 | 227 | $this->getModelConfiguration()->isDeletable( |
228 | 228 | $this->getModel() |
@@ -282,13 +282,13 @@ discard block |
||
282 | 282 | { |
283 | 283 | return parent::toArray() + [ |
284 | 284 | 'buttons' => $this->buttons |
285 | - ->each(function (ControlButtonInterface $button) { |
|
285 | + ->each(function(ControlButtonInterface $button) { |
|
286 | 286 | $button->setModel($this->getModel()); |
287 | 287 | }) |
288 | - ->filter(function (ControlButtonInterface $button) { |
|
288 | + ->filter(function(ControlButtonInterface $button) { |
|
289 | 289 | return $button->isActive(); |
290 | 290 | }) |
291 | - ->sortBy(function (ControlButtonInterface $button) { |
|
291 | + ->sortBy(function(ControlButtonInterface $button) { |
|
292 | 292 | return $button->getPosition(); |
293 | 293 | }), |
294 | 294 | ]; |
@@ -14,7 +14,7 @@ |
||
14 | 14 | { |
15 | 15 | $routeName = 'admin.form.element.dependent-select'; |
16 | 16 | |
17 | - if (! $router->has($routeName)) { |
|
17 | + if (!$router->has($routeName)) { |
|
18 | 18 | $router->post('{adminModel}/dependent-select/{field}/{id?}', [ |
19 | 19 | 'as' => $routeName, |
20 | 20 | 'uses' => '\SleepingOwl\Admin\Http\Controllers\FormElementController@dependentSelect', |