Example #1
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\View\View
  */
 public function index()
 {
     $works = $this->works->all();
     return view('backend.works.index', compact('works'));
 }
Example #2
0
 /**
  * Home Page.
  *
  * @return \Illuminate\View\View
  */
 public function home()
 {
     $works = $this->works->all();
     return view('frontend.pages.home', compact('works'));
 }
Example #3
0
 /**
  * Display the specified resource.
  *
  * @param string $slug
  *
  * @return \Illuminate\View\View
  */
 public function show($slug)
 {
     $work = $this->works->findByField('slug', $slug)->first();
     $works = $this->works->all();
     return view('frontend.pages.works.show', compact('work', 'works'));
 }