@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | */ |
173 | 173 | public function using(array $values, $default = null) |
174 | 174 | { |
175 | - return $this->as(function ($value) use ($values, $default) { |
|
175 | + return $this->as(function($value) use ($values, $default) { |
|
176 | 176 | if (is_null($value)) { |
177 | 177 | return $default; |
178 | 178 | } |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | */ |
193 | 193 | public function image($server = '', $width = 200, $height = 200) |
194 | 194 | { |
195 | - return $this->as(function ($path) use ($server, $width, $height) { |
|
195 | + return $this->as(function($path) use ($server, $width, $height) { |
|
196 | 196 | if (url()->isValidUrl($path)) { |
197 | 197 | $src = $path; |
198 | 198 | } elseif ($server) { |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | { |
217 | 217 | $field = $this; |
218 | 218 | |
219 | - return $this->as(function ($path) use ($server, $download, $field) { |
|
219 | + return $this->as(function($path) use ($server, $download, $field) { |
|
220 | 220 | |
221 | 221 | $name = basename($path); |
222 | 222 | |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | $storage = Storage::disk(config('admin.upload.disk')); |
233 | 233 | if ($storage->exists($path)) { |
234 | 234 | $url = $storage->url($path); |
235 | - $size = ($storage->size($path)/1000) . 'KB'; |
|
235 | + $size = ($storage->size($path) / 1000).'KB'; |
|
236 | 236 | } |
237 | 237 | } |
238 | 238 | |
@@ -266,7 +266,7 @@ discard block |
||
266 | 266 | */ |
267 | 267 | public function link($href = '', $target = '_blank') |
268 | 268 | { |
269 | - return $this->as(function ($link) use ($href, $target) { |
|
269 | + return $this->as(function($link) use ($href, $target) { |
|
270 | 270 | $href = $href ?: $link; |
271 | 271 | |
272 | 272 | return "<a href='$href' target='{$target}'>{$link}</a>"; |
@@ -282,12 +282,12 @@ discard block |
||
282 | 282 | */ |
283 | 283 | public function label($style = 'success') |
284 | 284 | { |
285 | - return $this->as(function ($value) use ($style) { |
|
285 | + return $this->as(function($value) use ($style) { |
|
286 | 286 | if ($value instanceof Arrayable) { |
287 | 287 | $value = $value->toArray(); |
288 | 288 | } |
289 | 289 | |
290 | - return collect((array) $value)->map(function ($name) use ($style) { |
|
290 | + return collect((array) $value)->map(function($name) use ($style) { |
|
291 | 291 | return "<span class='label label-{$style}'>$name</span>"; |
292 | 292 | })->implode(' '); |
293 | 293 | }); |
@@ -302,12 +302,12 @@ discard block |
||
302 | 302 | */ |
303 | 303 | public function badge($style = 'blue') |
304 | 304 | { |
305 | - return $this->as(function ($value) use ($style) { |
|
305 | + return $this->as(function($value) use ($style) { |
|
306 | 306 | if ($value instanceof Arrayable) { |
307 | 307 | $value = $value->toArray(); |
308 | 308 | } |
309 | 309 | |
310 | - return collect((array) $value)->map(function ($name) use ($style) { |
|
310 | + return collect((array) $value)->map(function($name) use ($style) { |
|
311 | 311 | return "<span class='badge bg-{$style}'>$name</span>"; |
312 | 312 | })->implode(' '); |
313 | 313 | }); |
@@ -322,7 +322,7 @@ discard block |
||
322 | 322 | { |
323 | 323 | $field = $this; |
324 | 324 | |
325 | - return $this->as(function ($value) use ($field) { |
|
325 | + return $this->as(function($value) use ($field) { |
|
326 | 326 | |
327 | 327 | $content = json_decode($value, true); |
328 | 328 | |
@@ -434,7 +434,7 @@ discard block |
||
434 | 434 | public function render() |
435 | 435 | { |
436 | 436 | if ($this->showAs->isNotEmpty()) { |
437 | - $this->showAs->each(function ($callable) { |
|
437 | + $this->showAs->each(function($callable) { |
|
438 | 438 | $this->value = $callable->call( |
439 | 439 | $this->parent->getModel(), |
440 | 440 | $this->value |