Update ResourceController.php

Fix