stickers = collect(glob(storage_path('app/public/superstar-pic/*.png'))) //->map(fn($path) => 'superstar-pic/' . basename($path)) ->map(fn($path) => basename($path)) ->toArray(); } public function openModal() { $this->showModal = true; } public function closeModal() { $this->showModal = false; } public function select($sticker) { $this->dispatch('stickerSelected', $sticker); $this->selectedSticker =$sticker; $this->showModal = false; } public function render() { return view('livewire.modals.sticker-modal'); } }