Update AggregateResource.php

Fixed the code.