@@ -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,8 +199,8 @@ discard block |
||
199 | 199 | */ |
200 | 200 | public function image($server = '', $width = 200, $height = 200) |
201 | 201 | { |
202 | - return $this->unescape()->as(function ($images) use ($server, $width, $height) { |
|
203 | - return collect($images)->map(function ($path) use ($server, $width, $height) { |
|
202 | + return $this->unescape()->as(function($images) use ($server, $width, $height) { |
|
203 | + return collect($images)->map(function($path) use ($server, $width, $height) { |
|
204 | 204 | if (empty($path)) { |
205 | 205 | return ''; |
206 | 206 | } |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | { |
237 | 237 | $field = $this; |
238 | 238 | |
239 | - return $this->unescape()->as(function ($path) use ($server, $download, $field) { |
|
239 | + return $this->unescape()->as(function($path) use ($server, $download, $field) { |
|
240 | 240 | $name = basename($path); |
241 | 241 | |
242 | 242 | $field->wrapped = false; |
@@ -288,7 +288,7 @@ discard block |
||
288 | 288 | */ |
289 | 289 | public function link($href = '', $target = '_blank') |
290 | 290 | { |
291 | - return $this->unescape()->as(function ($link) use ($href, $target) { |
|
291 | + return $this->unescape()->as(function($link) use ($href, $target) { |
|
292 | 292 | $href = $href ?: $link; |
293 | 293 | |
294 | 294 | return "<a href='$href' target='{$target}'>{$link}</a>"; |
@@ -304,12 +304,12 @@ discard block |
||
304 | 304 | */ |
305 | 305 | public function label($style = 'success') |
306 | 306 | { |
307 | - return $this->unescape()->as(function ($value) use ($style) { |
|
307 | + return $this->unescape()->as(function($value) use ($style) { |
|
308 | 308 | if ($value instanceof Arrayable) { |
309 | 309 | $value = $value->toArray(); |
310 | 310 | } |
311 | 311 | |
312 | - return collect((array) $value)->map(function ($name) use ($style) { |
|
312 | + return collect((array) $value)->map(function($name) use ($style) { |
|
313 | 313 | return "<span class='label label-{$style}'>$name</span>"; |
314 | 314 | })->implode(' '); |
315 | 315 | }); |
@@ -324,12 +324,12 @@ discard block |
||
324 | 324 | */ |
325 | 325 | public function badge($style = 'blue') |
326 | 326 | { |
327 | - return $this->unescape()->as(function ($value) use ($style) { |
|
327 | + return $this->unescape()->as(function($value) use ($style) { |
|
328 | 328 | if ($value instanceof Arrayable) { |
329 | 329 | $value = $value->toArray(); |
330 | 330 | } |
331 | 331 | |
332 | - return collect((array) $value)->map(function ($name) use ($style) { |
|
332 | + return collect((array) $value)->map(function($name) use ($style) { |
|
333 | 333 | return "<span class='badge bg-{$style}'>$name</span>"; |
334 | 334 | })->implode(' '); |
335 | 335 | }); |
@@ -344,7 +344,7 @@ discard block |
||
344 | 344 | { |
345 | 345 | $field = $this; |
346 | 346 | |
347 | - return $this->unescape()->as(function ($value) use ($field) { |
|
347 | + return $this->unescape()->as(function($value) use ($field) { |
|
348 | 348 | $content = json_decode($value, true); |
349 | 349 | |
350 | 350 | if (json_last_error() == 0) { |
@@ -480,7 +480,7 @@ discard block |
||
480 | 480 | public function render() |
481 | 481 | { |
482 | 482 | if ($this->showAs->isNotEmpty()) { |
483 | - $this->showAs->each(function ($callable) { |
|
483 | + $this->showAs->each(function($callable) { |
|
484 | 484 | $this->value = $callable->call( |
485 | 485 | $this->parent->getModel(), |
486 | 486 | $this->value |