@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | */ |
| 144 | 144 | public function values(array $values, $default = null) |
| 145 | 145 | { |
| 146 | - return $this->as(function ($value) use ($values, $default) { |
|
| 146 | + return $this->as(function($value) use ($values, $default) { |
|
| 147 | 147 | return array_get($values, $value, $default); |
| 148 | 148 | }); |
| 149 | 149 | } |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | */ |
| 160 | 160 | public function image($server = '', $width = 200, $height = 200) |
| 161 | 161 | { |
| 162 | - return $this->as(function ($path) use ($server, $width, $height) { |
|
| 162 | + return $this->as(function($path) use ($server, $width, $height) { |
|
| 163 | 163 | if (url()->isValidUrl($path)) { |
| 164 | 164 | $src = $path; |
| 165 | 165 | } elseif ($server) { |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | */ |
| 183 | 183 | public function link($href = '', $target = '_blank') |
| 184 | 184 | { |
| 185 | - return $this->as(function ($link) use ($href, $target) { |
|
| 185 | + return $this->as(function($link) use ($href, $target) { |
|
| 186 | 186 | $href = $href ?: $link; |
| 187 | 187 | |
| 188 | 188 | return "<a href='$href' target='{$target}'>{$link}</a>"; |
@@ -198,12 +198,12 @@ discard block |
||
| 198 | 198 | */ |
| 199 | 199 | public function label($style = 'success') |
| 200 | 200 | { |
| 201 | - return $this->as(function ($value) use ($style) { |
|
| 201 | + return $this->as(function($value) use ($style) { |
|
| 202 | 202 | if ($value instanceof Arrayable) { |
| 203 | 203 | $value = $value->toArray(); |
| 204 | 204 | } |
| 205 | 205 | |
| 206 | - return collect((array) $value)->map(function ($name) use ($style) { |
|
| 206 | + return collect((array) $value)->map(function($name) use ($style) { |
|
| 207 | 207 | return "<span class='label label-{$style}'>$name</span>"; |
| 208 | 208 | })->implode(' '); |
| 209 | 209 | }); |
@@ -218,12 +218,12 @@ discard block |
||
| 218 | 218 | */ |
| 219 | 219 | public function badge($style = 'blue') |
| 220 | 220 | { |
| 221 | - return $this->as(function ($value) use ($style) { |
|
| 221 | + return $this->as(function($value) use ($style) { |
|
| 222 | 222 | if ($value instanceof Arrayable) { |
| 223 | 223 | $value = $value->toArray(); |
| 224 | 224 | } |
| 225 | 225 | |
| 226 | - return collect((array) $value)->map(function ($name) use ($style) { |
|
| 226 | + return collect((array) $value)->map(function($name) use ($style) { |
|
| 227 | 227 | return "<span class='badge bg-{$style}'>$name</span>"; |
| 228 | 228 | })->implode(' '); |
| 229 | 229 | }); |
@@ -289,7 +289,7 @@ discard block |
||
| 289 | 289 | public function render() |
| 290 | 290 | { |
| 291 | 291 | if ($this->showAs->isNotEmpty()) { |
| 292 | - $this->showAs->each(function ($callable) { |
|
| 292 | + $this->showAs->each(function($callable) { |
|
| 293 | 293 | $this->value = $callable->call( |
| 294 | 294 | $this->parent->getModel(), |
| 295 | 295 | $this->value |
@@ -311,7 +311,7 @@ discard block |
||
| 311 | 311 | */ |
| 312 | 312 | public function values(array $values, $default = null) |
| 313 | 313 | { |
| 314 | - return $this->display(function ($value) use ($values, $default) { |
|
| 314 | + return $this->display(function($value) use ($values, $default) { |
|
| 315 | 315 | return array_get($values, $value, $default); |
| 316 | 316 | }); |
| 317 | 317 | } |
@@ -423,7 +423,7 @@ discard block |
||
| 423 | 423 | $grid = $this->grid; |
| 424 | 424 | $column = $this; |
| 425 | 425 | |
| 426 | - $this->display(function ($value) use ($grid, $column, $class) { |
|
| 426 | + $this->display(function($value) use ($grid, $column, $class) { |
|
| 427 | 427 | $definition = new $class($value, $grid, $column, $this); |
| 428 | 428 | |
| 429 | 429 | return $definition->display(); |
@@ -440,7 +440,7 @@ discard block |
||
| 440 | 440 | protected function htmlEntityEncode($item) |
| 441 | 441 | { |
| 442 | 442 | if (is_array($item)) { |
| 443 | - array_walk_recursive($item, function (&$value) { |
|
| 443 | + array_walk_recursive($item, function(&$value) { |
|
| 444 | 444 | $value = htmlentities($value); |
| 445 | 445 | }); |
| 446 | 446 | } else { |
@@ -520,7 +520,7 @@ discard block |
||
| 520 | 520 | */ |
| 521 | 521 | protected function callSupportDisplayer($abstract, $arguments) |
| 522 | 522 | { |
| 523 | - return $this->display(function ($value) use ($abstract, $arguments) { |
|
| 523 | + return $this->display(function($value) use ($abstract, $arguments) { |
|
| 524 | 524 | if (is_array($value) || $value instanceof Arrayable) { |
| 525 | 525 | return call_user_func_array([collect($value), $abstract], $arguments); |
| 526 | 526 | } |
@@ -544,7 +544,7 @@ discard block |
||
| 544 | 544 | protected function callBuiltinDisplayer($abstract, $arguments) |
| 545 | 545 | { |
| 546 | 546 | if ($abstract instanceof Closure) { |
| 547 | - return $this->display(function ($value) use ($abstract, $arguments) { |
|
| 547 | + return $this->display(function($value) use ($abstract, $arguments) { |
|
| 548 | 548 | return $abstract->call($this, ...array_merge([$value], $arguments)); |
| 549 | 549 | }); |
| 550 | 550 | } |
@@ -553,7 +553,7 @@ discard block |
||
| 553 | 553 | $grid = $this->grid; |
| 554 | 554 | $column = $this; |
| 555 | 555 | |
| 556 | - return $this->display(function ($value) use ($abstract, $grid, $column, $arguments) { |
|
| 556 | + return $this->display(function($value) use ($abstract, $grid, $column, $arguments) { |
|
| 557 | 557 | $displayer = new $abstract($value, $grid, $column, $this); |
| 558 | 558 | |
| 559 | 559 | return call_user_func_array([$displayer, 'display'], $arguments); |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | { |
| 185 | 185 | $inputs = array_dot(Input::all()); |
| 186 | 186 | |
| 187 | - $inputs = array_filter($inputs, function ($input) { |
|
| 187 | + $inputs = array_filter($inputs, function($input) { |
|
| 188 | 188 | return $input !== '' && !is_null($input); |
| 189 | 189 | }); |
| 190 | 190 | |
@@ -221,9 +221,9 @@ discard block |
||
| 221 | 221 | return $inputs; |
| 222 | 222 | } |
| 223 | 223 | |
| 224 | - $inputs = collect($inputs)->filter(function ($input, $key) { |
|
| 224 | + $inputs = collect($inputs)->filter(function($input, $key) { |
|
| 225 | 225 | return starts_with($key, "{$this->name}_"); |
| 226 | - })->mapWithKeys(function ($val, $key) { |
|
| 226 | + })->mapWithKeys(function($val, $key) { |
|
| 227 | 227 | $key = str_replace("{$this->name}_", '', $key); |
| 228 | 228 | |
| 229 | 229 | return [$key => $val]; |