@@ -134,6 +134,6 @@ |
||
| 134 | 134 | */ |
| 135 | 135 | protected function getStub() |
| 136 | 136 | { |
| 137 | - return __DIR__ . '/Lib/stubs/datatable-class-template.stub'; |
|
| 137 | + return __DIR__.'/Lib/stubs/datatable-class-template.stub'; |
|
| 138 | 138 | } |
| 139 | 139 | } |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | " ->add('", |
| 22 | 22 | $field, |
| 23 | 23 | "', null", |
| 24 | - ", trans('datatable." . strtolower($field) . "')", |
|
| 24 | + ", trans('datatable.".strtolower($field)."')", |
|
| 25 | 25 | ")", |
| 26 | 26 | ($isLast) ? "" : "\n" |
| 27 | 27 | ]; |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | */ |
| 86 | 86 | public function add($name, $closure = null, $translation = '') |
| 87 | 87 | { |
| 88 | - if (! empty($closure)) { |
|
| 88 | + if (!empty($closure)) { |
|
| 89 | 89 | $this->colomns[] = [ |
| 90 | 90 | $name, |
| 91 | 91 | $closure, |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | */ |
| 109 | 109 | public function addTranslation($name, $translation) |
| 110 | 110 | { |
| 111 | - $this->colomnsDisplay[] = ! empty($translation) ? $translation : ucfirst($name); |
|
| 111 | + $this->colomnsDisplay[] = !empty($translation) ? $translation : ucfirst($name); |
|
| 112 | 112 | } |
| 113 | 113 | |
| 114 | 114 | /** |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | $colSearchAndSort = []; |
| 125 | 125 | $sortOnly = []; |
| 126 | 126 | |
| 127 | - if (! empty($this->colomns)) { |
|
| 127 | + if (!empty($this->colomns)) { |
|
| 128 | 128 | foreach ($this->colomns as $key => $value) { |
| 129 | 129 | |
| 130 | 130 | if (is_string($value)) { |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | */ |
| 155 | 155 | public function setClassRow($datatable) |
| 156 | 156 | { |
| 157 | - $datatable->setRowClass(function ($row) { |
|
| 157 | + $datatable->setRowClass(function($row) { |
|
| 158 | 158 | return (isset($row->status) && empty($row->status)) ? 'danger' : ''; |
| 159 | 159 | }); |
| 160 | 160 | |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | 'colomns_display' => $this->colomnsDisplay, |
| 175 | 175 | 'datatable_options' => $this->addOptions(), |
| 176 | 176 | 'id' => strtolower(str_replace('\\', '_', get_class($this))), |
| 177 | - 'route' => ! empty($route) ? $route : $this->getControllerNameForAction() . '@getDatatable', |
|
| 177 | + 'route' => !empty($route) ? $route : $this->getControllerNameForAction().'@getDatatable', |
|
| 178 | 178 | 'filters' => $this->addFilter(), |
| 179 | 179 | ]); |
| 180 | 180 | } |
@@ -190,10 +190,10 @@ discard block |
||
| 190 | 190 | { |
| 191 | 191 | $reflection = new ReflectionClass(get_class($this)); |
| 192 | 192 | |
| 193 | - $this->add('actions', function ($model) use ($template, $reflection, $route) { |
|
| 193 | + $this->add('actions', function($model) use ($template, $reflection, $route) { |
|
| 194 | 194 | return view($template, [ |
| 195 | 195 | 'data' => $model->toArray(), |
| 196 | - 'route' => ! empty($route) ? $route . '@' : $this->getControllerNameForAction() . '@', |
|
| 196 | + 'route' => !empty($route) ? $route.'@' : $this->getControllerNameForAction().'@', |
|
| 197 | 197 | ])->render(); |
| 198 | 198 | }); |
| 199 | 199 | } |
@@ -225,7 +225,7 @@ discard block |
||
| 225 | 225 | */ |
| 226 | 226 | protected function addOptions() |
| 227 | 227 | { |
| 228 | - if (! array_key_exists('order', $this->datatableOptions) && ! empty($this->defaultOrder)) { |
|
| 228 | + if (!array_key_exists('order', $this->datatableOptions) && !empty($this->defaultOrder)) { |
|
| 229 | 229 | if (is_array($this->defaultOrder)) { |
| 230 | 230 | foreach ($this->defaultOrder as $keyOrder => $order) { |
| 231 | 231 | if (is_string($order[0])) { |
@@ -258,7 +258,7 @@ discard block |
||
| 258 | 258 | { |
| 259 | 259 | $action = explode('@', Route::currentRouteAction()); |
| 260 | 260 | |
| 261 | - return '\\' . $action[0]; |
|
| 261 | + return '\\'.$action[0]; |
|
| 262 | 262 | } |
| 263 | 263 | |
| 264 | 264 | /** |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | ); |
| 43 | 43 | |
| 44 | 44 | |
| 45 | - $this->app->singleton('datatable',function() |
|
| 45 | + $this->app->singleton('datatable', function() |
|
| 46 | 46 | { |
| 47 | 47 | return new Datatable; |
| 48 | 48 | }); |