@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | */ |
192 | 192 | public function using(array $values, $default = null) |
193 | 193 | { |
194 | - return $this->as(function ($value) use ($values, $default) { |
|
194 | + return $this->as(function($value) use ($values, $default) { |
|
195 | 195 | if (is_null($value)) { |
196 | 196 | return $default; |
197 | 197 | } |
@@ -211,8 +211,8 @@ discard block |
||
211 | 211 | */ |
212 | 212 | public function image($server = '', $width = 200, $height = 200) |
213 | 213 | { |
214 | - return $this->unescape()->as(function ($images) use ($server, $width, $height) { |
|
215 | - return collect($images)->map(function ($path) use ($server, $width, $height) { |
|
214 | + return $this->unescape()->as(function($images) use ($server, $width, $height) { |
|
215 | + return collect($images)->map(function($path) use ($server, $width, $height) { |
|
216 | 216 | if (empty($path)) { |
217 | 217 | return ''; |
218 | 218 | } |
@@ -247,8 +247,8 @@ discard block |
||
247 | 247 | */ |
248 | 248 | public function carousel($width = 300, $height = 200, $server = '') |
249 | 249 | { |
250 | - return $this->unescape()->as(function ($images) use ($server, $width, $height) { |
|
251 | - $items = collect($images)->map(function ($path) use ($server, $width, $height) { |
|
250 | + return $this->unescape()->as(function($images) use ($server, $width, $height) { |
|
251 | + $items = collect($images)->map(function($path) use ($server, $width, $height) { |
|
252 | 252 | if (empty($path)) { |
253 | 253 | return ''; |
254 | 254 | } |
@@ -288,7 +288,7 @@ discard block |
||
288 | 288 | { |
289 | 289 | $field = $this; |
290 | 290 | |
291 | - return $this->unescape()->as(function ($path) use ($server, $download, $field) { |
|
291 | + return $this->unescape()->as(function($path) use ($server, $download, $field) { |
|
292 | 292 | $name = basename($path); |
293 | 293 | |
294 | 294 | $field->border = false; |
@@ -342,7 +342,7 @@ discard block |
||
342 | 342 | */ |
343 | 343 | public function link($href = '', $target = '_blank') |
344 | 344 | { |
345 | - return $this->unescape()->as(function ($link) use ($href, $target) { |
|
345 | + return $this->unescape()->as(function($link) use ($href, $target) { |
|
346 | 346 | $href = $href ?: $link; |
347 | 347 | |
348 | 348 | return "<a href='$href' target='{$target}'>{$link}</a>"; |
@@ -358,12 +358,12 @@ discard block |
||
358 | 358 | */ |
359 | 359 | public function label($style = 'success') |
360 | 360 | { |
361 | - return $this->unescape()->as(function ($value) use ($style) { |
|
361 | + return $this->unescape()->as(function($value) use ($style) { |
|
362 | 362 | if ($value instanceof Arrayable) { |
363 | 363 | $value = $value->toArray(); |
364 | 364 | } |
365 | 365 | |
366 | - return collect((array) $value)->map(function ($name) use ($style) { |
|
366 | + return collect((array) $value)->map(function($name) use ($style) { |
|
367 | 367 | return "<span class='label label-{$style}'>$name</span>"; |
368 | 368 | })->implode(' '); |
369 | 369 | }); |
@@ -378,12 +378,12 @@ discard block |
||
378 | 378 | */ |
379 | 379 | public function badge($style = 'blue') |
380 | 380 | { |
381 | - return $this->unescape()->as(function ($value) use ($style) { |
|
381 | + return $this->unescape()->as(function($value) use ($style) { |
|
382 | 382 | if ($value instanceof Arrayable) { |
383 | 383 | $value = $value->toArray(); |
384 | 384 | } |
385 | 385 | |
386 | - return collect((array) $value)->map(function ($name) use ($style) { |
|
386 | + return collect((array) $value)->map(function($name) use ($style) { |
|
387 | 387 | return "<span class='badge bg-{$style}'>$name</span>"; |
388 | 388 | })->implode(' '); |
389 | 389 | }); |
@@ -398,7 +398,7 @@ discard block |
||
398 | 398 | { |
399 | 399 | $field = $this; |
400 | 400 | |
401 | - return $this->unescape()->as(function ($value) use ($field) { |
|
401 | + return $this->unescape()->as(function($value) use ($field) { |
|
402 | 402 | $content = json_decode($value ?: '', true); |
403 | 403 | |
404 | 404 | if (json_last_error() == 0) { |
@@ -418,7 +418,7 @@ discard block |
||
418 | 418 | */ |
419 | 419 | public function filesize() |
420 | 420 | { |
421 | - return $this->as(function ($value) { |
|
421 | + return $this->as(function($value) { |
|
422 | 422 | return file_size($value); |
423 | 423 | }); |
424 | 424 | } |
@@ -557,7 +557,7 @@ discard block |
||
557 | 557 | |
558 | 558 | $field = $this; |
559 | 559 | |
560 | - return $this->as(function ($value) use ($extend, $field, $arguments) { |
|
560 | + return $this->as(function($value) use ($extend, $field, $arguments) { |
|
561 | 561 | if (!$extend->border) { |
562 | 562 | $field->border = false; |
563 | 563 | } |
@@ -616,7 +616,7 @@ discard block |
||
616 | 616 | public function render() |
617 | 617 | { |
618 | 618 | if ($this->showAs->isNotEmpty()) { |
619 | - $this->showAs->each(function ($callable) { |
|
619 | + $this->showAs->each(function($callable) { |
|
620 | 620 | $this->value = $callable->call( |
621 | 621 | $this->parent->getModel(), |
622 | 622 | $this->value |