From 2709c855647d325705ddd101418866efc8bdcc6e Mon Sep 17 00:00:00 2001 From: Sevan Nerse Date: Mon, 18 Jan 2021 14:46:42 +0300 Subject: [PATCH] default value of maxFiles will be 1 for fileGroup partial --- resources/views/partials/form/file_group.blade.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/resources/views/partials/form/file_group.blade.php b/resources/views/partials/form/file_group.blade.php index bfb7ca363..333129c3c 100644 --- a/resources/views/partials/form/file_group.blade.php +++ b/resources/views/partials/form/file_group.blade.php @@ -13,7 +13,12 @@ class="{{ $attributes['dropzone-class'] }}" @endif @if (!empty($attributes['options'])) - :options={{ json_encode($attributes['options']) }} + @if (isset($attributes['options']['maxFiles'])) + :options={{ json_encode($attributes['options']) }} + @else + @php $attributes['options']['maxFiles'] = 1 @endphp + :options={{ json_encode($attributes['options']) }} + @endif @endif @if (!empty($attributes['multiple'])) multiple