/** * Display a listing of the resource. * * @return Response */ public function index() { return view('index', ['posts' => Post::orderBy('created_at', 'DESC')->with('category')->paginate(5)]); }