@@ -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,9 +199,9 @@ 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) { |
|
| 202 | + return $this->unescape()->as(function($images) use ($server, $width, $height) { |
|
| 203 | 203 | |
| 204 | - return collect($images)->map(function ($path) use ($server, $width, $height) { |
|
| 204 | + return collect($images)->map(function($path) use ($server, $width, $height) { |
|
| 205 | 205 | if (empty($path)) { |
| 206 | 206 | return ''; |
| 207 | 207 | } |
@@ -209,7 +209,7 @@ discard block |
||
| 209 | 209 | if (url()->isValidUrl($path)) { |
| 210 | 210 | $src = $path; |
| 211 | 211 | } elseif ($server) { |
| 212 | - $src = $server . $path; |
|
| 212 | + $src = $server.$path; |
|
| 213 | 213 | } else { |
| 214 | 214 | $disk = config('admin.upload.disk'); |
| 215 | 215 | |
@@ -237,7 +237,7 @@ discard block |
||
| 237 | 237 | { |
| 238 | 238 | $field = $this; |
| 239 | 239 | |
| 240 | - return $this->unescape()->as(function ($path) use ($server, $download, $field) { |
|
| 240 | + return $this->unescape()->as(function($path) use ($server, $download, $field) { |
|
| 241 | 241 | $name = basename($path); |
| 242 | 242 | |
| 243 | 243 | $field->wrapped = false; |
@@ -289,7 +289,7 @@ discard block |
||
| 289 | 289 | */ |
| 290 | 290 | public function link($href = '', $target = '_blank') |
| 291 | 291 | { |
| 292 | - return $this->unescape()->as(function ($link) use ($href, $target) { |
|
| 292 | + return $this->unescape()->as(function($link) use ($href, $target) { |
|
| 293 | 293 | $href = $href ?: $link; |
| 294 | 294 | |
| 295 | 295 | return "<a href='$href' target='{$target}'>{$link}</a>"; |
@@ -305,12 +305,12 @@ discard block |
||
| 305 | 305 | */ |
| 306 | 306 | public function label($style = 'success') |
| 307 | 307 | { |
| 308 | - return $this->unescape()->as(function ($value) use ($style) { |
|
| 308 | + return $this->unescape()->as(function($value) use ($style) { |
|
| 309 | 309 | if ($value instanceof Arrayable) { |
| 310 | 310 | $value = $value->toArray(); |
| 311 | 311 | } |
| 312 | 312 | |
| 313 | - return collect((array) $value)->map(function ($name) use ($style) { |
|
| 313 | + return collect((array) $value)->map(function($name) use ($style) { |
|
| 314 | 314 | return "<span class='label label-{$style}'>$name</span>"; |
| 315 | 315 | })->implode(' '); |
| 316 | 316 | }); |
@@ -325,12 +325,12 @@ discard block |
||
| 325 | 325 | */ |
| 326 | 326 | public function badge($style = 'blue') |
| 327 | 327 | { |
| 328 | - return $this->unescape()->as(function ($value) use ($style) { |
|
| 328 | + return $this->unescape()->as(function($value) use ($style) { |
|
| 329 | 329 | if ($value instanceof Arrayable) { |
| 330 | 330 | $value = $value->toArray(); |
| 331 | 331 | } |
| 332 | 332 | |
| 333 | - return collect((array) $value)->map(function ($name) use ($style) { |
|
| 333 | + return collect((array) $value)->map(function($name) use ($style) { |
|
| 334 | 334 | return "<span class='badge bg-{$style}'>$name</span>"; |
| 335 | 335 | })->implode(' '); |
| 336 | 336 | }); |
@@ -345,7 +345,7 @@ discard block |
||
| 345 | 345 | { |
| 346 | 346 | $field = $this; |
| 347 | 347 | |
| 348 | - return $this->unescape()->as(function ($value) use ($field) { |
|
| 348 | + return $this->unescape()->as(function($value) use ($field) { |
|
| 349 | 349 | $content = json_decode($value, true); |
| 350 | 350 | |
| 351 | 351 | if (json_last_error() == 0) { |
@@ -481,7 +481,7 @@ discard block |
||
| 481 | 481 | public function render() |
| 482 | 482 | { |
| 483 | 483 | if ($this->showAs->isNotEmpty()) { |
| 484 | - $this->showAs->each(function ($callable) { |
|
| 484 | + $this->showAs->each(function($callable) { |
|
| 485 | 485 | $this->value = $callable->call( |
| 486 | 486 | $this->parent->getModel(), |
| 487 | 487 | $this->value |