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