@php $uuid = \Illuminate\Support\Str::uuid(); if(!\Illuminate\Support\Facades\File::exists(storage_path('app/public/tmp'))) { \Illuminate\Support\Facades\File::makeDirectory(storage_path('app/public/tmp')); } $fileUrl = \Illuminate\Support\Facades\File::copy($file['path'], storage_path('app/public') .'/tmp/'.$uuid.'.' . str($file['extension'])) @endphp @if(str($file['extension'])->contains([ 'jpg', 'jpeg', 'png', 'gif', 'webp', ])) @elseif(str($file['extension'])->contains([ "mp4", "webm", "ogg", "avi", "mov", "flv", ])) @elseif(str($file['extension'])->contains([ "mp3", "wav", "ogg", "flac", "aac", "wma", ])) @elseif(str($file['extension'])->contains('svg'))
{!! \Illuminate\Support\Facades\File::get($file['path']) !!}
@elseif(str($file['extension'])->contains([ 'csv', 'xls', 'xlsx', 'ods', 'tsv' ])) @php $data = Excel::toArray(new \TomatoPHP\FilamentBrowser\Excel\FileImport(), $file['path'])[0]; @endphp
@foreach($data as $item) @foreach($item as $value) @endforeach @endforeach
@elseif(str($file['extension'])->contains('pdf'))
@endif