type = $type; } /** * Get the view / contents that represent the component. * * @return \Illuminate\View\View|string */ public function render() { $page = Page::where('type', $this->type)->first(); return view('components.single-pages', compact('page')); } }