Ejemplo n.º 1
0
 /**
  * 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'));
 }
Ejemplo n.º 2
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\View\View
  */
 public function index()
 {
     $posts = $this->repository->all();
     return view('backend.posts.index', compact('posts'));
 }