@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | */ |
180 | 180 | public function using(array $values, $default = null) |
181 | 181 | { |
182 | - return $this->as(function ($value) use ($values, $default) { |
|
182 | + return $this->as(function($value) use ($values, $default) { |
|
183 | 183 | if (is_null($value)) { |
184 | 184 | return $default; |
185 | 185 | } |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | */ |
200 | 200 | public function image($server = '', $width = 200, $height = 200) |
201 | 201 | { |
202 | - return $this->unescape()->as(function ($path) use ($server, $width, $height) { |
|
202 | + return $this->unescape()->as(function($path) use ($server, $width, $height) { |
|
203 | 203 | if (empty($path)) { |
204 | 204 | return ''; |
205 | 205 | } |
@@ -232,10 +232,10 @@ discard block |
||
232 | 232 | */ |
233 | 233 | public function file($server = '', $download = true) |
234 | 234 | { |
235 | - if ( ! $this->value ) return; |
|
235 | + if (!$this->value) return; |
|
236 | 236 | $field = $this; |
237 | 237 | |
238 | - return $this->unescape()->as(function ($path) use ($server, $download, $field) { |
|
238 | + return $this->unescape()->as(function($path) use ($server, $download, $field) { |
|
239 | 239 | $name = basename($path); |
240 | 240 | |
241 | 241 | $field->wrapped = false; |
@@ -283,7 +283,7 @@ discard block |
||
283 | 283 | */ |
284 | 284 | public function link($href = '', $target = '_blank') |
285 | 285 | { |
286 | - return $this->unescape()->as(function ($link) use ($href, $target) { |
|
286 | + return $this->unescape()->as(function($link) use ($href, $target) { |
|
287 | 287 | $href = $href ?: $link; |
288 | 288 | |
289 | 289 | return "<a href='$href' target='{$target}'>{$link}</a>"; |
@@ -299,12 +299,12 @@ discard block |
||
299 | 299 | */ |
300 | 300 | public function label($style = 'success') |
301 | 301 | { |
302 | - return $this->unescape()->as(function ($value) use ($style) { |
|
302 | + return $this->unescape()->as(function($value) use ($style) { |
|
303 | 303 | if ($value instanceof Arrayable) { |
304 | 304 | $value = $value->toArray(); |
305 | 305 | } |
306 | 306 | |
307 | - return collect((array) $value)->map(function ($name) use ($style) { |
|
307 | + return collect((array) $value)->map(function($name) use ($style) { |
|
308 | 308 | return "<span class='label label-{$style}'>$name</span>"; |
309 | 309 | })->implode(' '); |
310 | 310 | }); |
@@ -319,12 +319,12 @@ discard block |
||
319 | 319 | */ |
320 | 320 | public function badge($style = 'blue') |
321 | 321 | { |
322 | - return $this->unescape()->as(function ($value) use ($style) { |
|
322 | + return $this->unescape()->as(function($value) use ($style) { |
|
323 | 323 | if ($value instanceof Arrayable) { |
324 | 324 | $value = $value->toArray(); |
325 | 325 | } |
326 | 326 | |
327 | - return collect((array) $value)->map(function ($name) use ($style) { |
|
327 | + return collect((array) $value)->map(function($name) use ($style) { |
|
328 | 328 | return "<span class='badge bg-{$style}'>$name</span>"; |
329 | 329 | })->implode(' '); |
330 | 330 | }); |
@@ -339,7 +339,7 @@ discard block |
||
339 | 339 | { |
340 | 340 | $field = $this; |
341 | 341 | |
342 | - return $this->unescape()->as(function ($value) use ($field) { |
|
342 | + return $this->unescape()->as(function($value) use ($field) { |
|
343 | 343 | $content = json_decode($value, true); |
344 | 344 | |
345 | 345 | if (json_last_error() == 0) { |
@@ -475,7 +475,7 @@ discard block |
||
475 | 475 | public function render() |
476 | 476 | { |
477 | 477 | if ($this->showAs->isNotEmpty()) { |
478 | - $this->showAs->each(function ($callable) { |
|
478 | + $this->showAs->each(function($callable) { |
|
479 | 479 | $this->value = $callable->call( |
480 | 480 | $this->parent->getModel(), |
481 | 481 | $this->value |