Update PeriodsController.php