repository = $our_team; parent::__construct(); } /** * Show our_team's list. * * @param string $slug * * @return response */ protected function index() { $our_teams = $this->repository ->pushCriteria(app('Litepie\Repository\Criteria\RequestCriteria')) ->scopeQuery(function($query){ return $query->orderBy('id','DESC'); })->paginate(); return $this->response->title(trans('$our_team::$our_team.names')) ->view('$our_team::public.our_team.index') ->data(compact('$our_teams')) ->output(); } /** * Show our_team's list based on a type. * * @param string $slug * * @return response */ protected function list($type = null) { $our_teams = $this->repository ->pushCriteria(app('Litepie\Repository\Criteria\RequestCriteria')) ->scopeQuery(function($query){ return $query->orderBy('id','DESC'); })->paginate(); return $this->response->title(trans('$our_team::$our_team.names')) ->view('$our_team::public.our_team.index') ->data(compact('$our_teams')) ->output(); } /** * Show our_team. * * @param string $slug * * @return response */ protected function show($slug) { $our_team = $this->repository->scopeQuery(function($query) use ($slug) { return $query->orderBy('id','DESC') ->where('slug', $slug); })->first(['*']); return $this->response->title($$our_team->name . trans('$our_team::$our_team.name')) ->view('$our_team::public.our_team.show') ->data(compact('$our_team')) ->output(); } }