modules = $this->modules(config('litecms.scheduler.modules'), 'scheduler', guard_url('scheduler')); $this->repository = $scheduler; } /** * Show scheduler's list. * * @return response */ protected function index(PublicRequest $request) { $search = $request->search; $pageLimit = $request->input('pageLimit', config('database.pagination.limit')); $data = $this->repository ->pushFilter(RequestFilter::class) ->pushFilter(SchedulerPublicFilter::class) ->setPresenter(SchedulerListPresenter::class) ->select('schedulers.*') ->paginate($pageLimit) ->withQueryString() ->toArray(); extract($data); $categories = []; $tags = []; $recent = []; return $this->response->setMetaTitle(trans('scheduler::scheduler.names')) ->view('scheduler::public.scheduler.index') ->data(compact('data', 'meta', 'categories', 'tags', 'recent')) ->output(); } /** * Show scheduler. * * @param string $slug * * @return response */ protected function show(PublicRequest $request, $slug) { $data = $this->repository ->findBySlug($slug) ->toArray(); $categories = []; $tags = []; $recent = []; return $this->response->setMetaTitle($data['title'] . trans('scheduler::scheduler.name')) ->view('scheduler::public.scheduler.show') ->data(compact('data', 'categories', 'tags', 'recent')) ->output(); } }