/** * Display a listing of the posts. * * @return \Illuminate\View\View */ public function index() { $title = 'Blog'; $posts = PostRepository::with(['user'])->paginate(); $links = PostRepository::links(); return view('blog.index')->with(compact('title', 'posts', 'links')); }