image($name, 100, 100); $tmpId = Str::random(32); $filename = $tmpId.'-'.base64_encode($file->getClientOriginalName()).'.'.$file->getClientOriginalExtension(); $path = "livewire-tmp/{$filename}"; Storage::disk('local')->putFileAs('livewire-tmp', $file, $filename); return [ 'tmpFilename' => $filename, 'name' => $file->getClientOriginalName(), 'extension' => $file->getClientOriginalExtension(), 'path' => storage_path("app/private/{$path}"), 'temporaryUrl' => url("livewire/preview-file/{$filename}"), 'size' => $file->getSize(), ]; } function makeValidOpeningHours() { return collect(Day::cases()) ->mapWithKeys(fn ($day) => [ $day->value => [ 'open_time' => '09:00', 'close_time' => '21:00', ], ]) ->toArray(); }