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