public function __construct() { parent::__construct(); $this->searchRepository = app('App\\Repositories\\SearchRepository'); $term = \Input::get('term'); $term = preg_replace('![^\\pL\\pN\\s]+!u', '', mb_strtolower($term)); $this->searchRepository->term = $term; $this->setType(); $this->theme->share('searchRepository', $this->searchRepository); }
public function __construct() { parent::__construct(); $this->userid = \Request::segment(1); $this->profileUser = $this->userRepository->getProfileUser($this->userid); $this->theme->share('profileUser', $this->profileUser); if (\Auth::check()) { $this->theme->share('viewerUser', \Auth::user()); } $this->setTitle(); }