Skip to content

Commit 3aa19e0

Browse files
committed
return early
1 parent 4a9da2a commit 3aa19e0

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/resources/views/crud/columns/upload_multiple.blade.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@
66
$column['escaped'] = $column['escaped'] ?? true;
77
$column['wrapper']['element'] = $column['wrapper']['element'] ?? 'a';
88
$column['wrapper']['target'] = $column['wrapper']['target'] ?? '_blank';
9-
$column_wrapper_href = $column['wrapper']['href'] ?? function($file_path, $disk, $prefix) { return
10-
!is_null($disk) ?
11-
(isset($column['temporary']) ?
9+
$column_wrapper_href = $column['wrapper']['href'] ?? function($file_path, $disk, $prefix) {
10+
if (is_null($disk)) {
11+
return $prefix.$file_path;
12+
}
13+
14+
return isset($column['temporary']) ?
1215
asset(\Storage::disk($disk)->temporaryUrl($file_path, Carbon\Carbon::now()->addMinutes($column['temporary']))) :
13-
asset(\Storage::disk($disk)->url($file_path))
14-
) : asset($prefix.$file_path);
16+
asset(\Storage::disk($disk)->url($file_path));
1517
};
1618
1719
if($column['value'] instanceof \Closure) {

0 commit comments

Comments
 (0)