get('viewRange', 'week'); // as you can see, this method now only supports "right now": $now = new \Carbon\Carbon; $start = clone $now; $end = clone $now; switch ($viewRange->data) { case 'week': $start->startOfWeek(); $end->endOfWeek(); break; default: case 'month': $start->startOfMonth(); $end->endOfMonth(); break; } return [$start, $end]; } }