Esempio n. 1
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\View\View
  */
 public function index()
 {
     $works = $this->repository->with('tags')->all();
     $tags = Tag::with(['posts' => function (BelongsToMany $query) {
         $query->where('type', 'work');
     }])->get();
     return view('frontend.pages.works.index', compact('works', 'tags'));
 }
Esempio n. 2
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\View\View
  */
 public function index()
 {
     $posts = $this->post->with('author')->paginate(5);
     return view('frontend.pages.blog.index', compact('posts'));
 }