id = $id; } #[On('showPostCardInModal')] public function open($id) { $this->id = $id; } public function close() { $this->id = null; } public function render() { if ($this->id) { $post = Post::find($this->id); if (Storage::disk('public')->exists($post->image)) { $post->image = Storage::url($post->image); } else { $post->image = false; } return view('post::list.card', [ 'post' => $post ]); } else { return view('post::list.card', [ ]); } } }