Update ResourceController.php