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