Update ApiResource.php

Fix for underscored namespaces and className method.