Skip to content

Commit afbac27

Browse files
committed
Fixed issue which caused upload_multiple column items to all have the url of the first item
1 parent c716f9d commit afbac27

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@
44
$column['escaped'] = $column['escaped'] ?? true;
55
$column['wrapper']['element'] = $column['wrapper']['element'] ?? 'a';
66
$column['wrapper']['target'] = $column['wrapper']['target'] ?? '_blank';
7+
$href_override = $column['wrapper']['href'] ?? null;
78
@endphp
89

910
<span>
1011
@if ($value && count($value))
1112
@foreach ($value as $file_path)
1213
@php
13-
$column['wrapper']['href'] = $column['wrapper']['href'] ?? ( isset($column['disk'])?asset(\Storage::disk($column['disk'])->url($file_path)):asset($column['prefix'].$file_path) );
14+
$column['wrapper']['href'] = $href_override ?? ( isset($column['disk'])?asset(\Storage::disk($column['disk'])->url($file_path)):asset($column['prefix'].$file_path) );
1415
$text = $column['prefix'].$file_path;
1516
@endphp
1617
@includeWhen(!empty($column['wrapper']), 'crud::columns.inc.wrapper_start')

0 commit comments

Comments
 (0)