/** * Display a listing of the resource. * * @return Response */ public function index() { $colors = Colors::paginate(20); $index = $colors->getPerPage() * ($colors->getCurrentPage() - 1) + 1; return View::make('colors.index', compact('colors', 'index')); }