Skip to content

Commit

Permalink
polish
Browse files Browse the repository at this point in the history
  • Loading branch information
freekmurze committed Jul 16, 2024
1 parent 7a2bbd9 commit 83cb8f3
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions resources/views/upload.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@
'placeholder' => 'Drag & Drop your files or <span class="filepond--label-action"> Browse </span>',
])
@php($wireModelAttribute = $attributes->whereStartsWith('wire:model')->first() ?? throw new Exception("You must wire:model to the filepond input."))


$pondProperties = $attributes->except([
'class',
'placeholder',
'required',
'disabled',
'multiple',
'wire:model',
])
<div
class="{{ $attributes->get('class') }}"
wire:ignore
Expand Down Expand Up @@ -52,14 +62,7 @@ class="{{ $attributes->get('class') }}"
disabled: @js($disabled),
});
pond.setOptions(@js($attributes->except([
'class',
'placeholder',
'required',
'disabled',
'multiple',
'wire:model',
])));
pond.setOptions(@js($pondProperties));
pond.addFiles(files)
pond.on('addfile', (error, file) => {
Expand Down

0 comments on commit 83cb8f3

Please sign in to comment.