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