/** * Display the specified resource. * * @param string $slug * * @return \Illuminate\View\View */ public function show($slug) { $work = $this->repository->findBy('slug', $slug); $works = $this->repository->all(); return view('frontend.pages.works.show', compact('work', 'works')); }
/** * Display a listing of the resource. * * @return \Illuminate\View\View */ public function index() { $posts = $this->repository->all(); return view('backend.posts.index', compact('posts')); }