Skip to content

Commit 21b4025

Browse files
authored
Merge pull request #4859 from Laravel-Backpack/remove-extra-parenthesis
remove extra parenthesis
2 parents 6ff47ed + 436adb5 commit 21b4025

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

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

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,15 @@
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']) ?
12-
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));
9+
$column_wrapper_href = $column['wrapper']['href'] ??
10+
function($file_path, $disk, $prefix) {
11+
if (is_null($disk)) {
12+
return $prefix.$file_path;
13+
}
14+
if (isset($column['temporary'])) {
15+
return asset(\Storage::disk($disk)->temporaryUrl($file_path, Carbon\Carbon::now()->addMinutes($column['temporary'])));
16+
}
17+
return asset(\Storage::disk($disk)->url($file_path));
1518
};
1619
1720
if($column['value'] instanceof \Closure) {

0 commit comments

Comments
 (0)