public function onRun() { $this->portfolio = Item::where('slug', $this->property('slug'))->first(); }
/** * Load the selected item by its slug * * @param $selectedItem * @return mixed */ protected function loadItemBySlug($selectedItem) { $item = PortfolioItem::where('slug', '=', $selectedItem)->first(); return $item; }