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