repository = $facebook_account; parent::__construct(); } /** * Show facebook_account's list. * * @param string $slug * * @return response */ protected function index() { $facebook_accounts = $this->repository->scopeQuery(function($query){ return $query->orderBy('id','DESC'); })->paginate(); return $this->theme->of('fbaccount::public.facebook_account.index', compact('facebook_accounts'))->render(); } /** * Show facebook_account. * * @param string $slug * * @return response */ protected function show($slug) { $facebook_account = $this->repository->scopeQuery(function($query) use ($slug) { return $query->orderBy('id','DESC') ->where('slug', $slug); })->first(['*']); return $this->theme->of('fbaccount::public.facebook_account.show', compact('facebook_account'))->render(); } }