A successful response after hitting user registration endpoint.
It throws BadMethodCallException
{"errors":"Oops something went wrong.","status_code":400,"message":"Call to undefined method Illuminate\\Database\\Query\\Builder::getResourceKey()","exception":"BadMethodCallException","trace":"[{\"file\":\"\\\/home\\\/vagrant\\\/Sites\\\/dev\\\/apiato\\\/vendor\\\/laravel\\\/framework\\\/src\\\/Illuminate\\\/Database\\\/Eloquent\\\/Builder.php\",\"line\":1254,\"function\":\"__call\",\"class\":\"Illuminate\\\\Database\\\\Query\\\\Builder\",\"type\":\"->\",\"args\":[\"getResourceKey\",[]]},{\"file\":\"\\\/home\\\/vagrant\\\/Sites\\\/dev\\\/apiato\\\/vendor\\\/laravel\\\/framework\\\/src\\\/Illuminate\\\/Database\\\/Eloquent\\\/Model.php\",\"line\":1372,\"function\":\"__call\",\"class\":\"Illuminate\\\\Database\\\\Eloquent\\\\Builder\",\"type\":\"->\",\"args\":[\"getResourceKey\",[]]},{\"file\":\"\\\/home\\\/vagrant\\\/Sites\\\/dev\\\/apiato\\\/vendor\\\/apiato\\\/core\\\/Traits\\\/ResponseTrait.php\",\"line\":70,\"function\":\"__call\",\"class\":\"Illuminate\\\\Database\\\\Eloquent\\\\Model\",\"type\":\"->\",\"args\":[\"getResourceKey\",[]]},{\"file\":\"\\\/home\\\/vagrant\\\/Sites\\\/dev\\\/apiato\\\/app\\\/Containers\\\/User\\\/UI\\\/API\\\/Controllers\\\/Controller.php\",\"line\":43,\"function\":\"transform\",\"class\":\"Apiato\\\\Core\\\\Abstracts\\\\Controllers\\\\ApiController\",\"type\":\"->\",\"args\":[{\"email\":\"[email protected]\",\"name\":\"JohnDoe\",\"gender\":null,\"birth\":null,\"is_client\":true,\"updated_at\":\"2017-08-12 07:22:45\",\"created_at\":\"2017-08-12 07:22:45\",\"id\":2},\"App\\\\Containers\\\\User\\\\UI\\\\API\\\\Transformers\\\\UserTransformer\"]},{\"function\":\"registerUser\",\"class\":\"App\\\\Containers\\\\User\\\\UI\\\\API\\\\Controllers\\\\Controller\",\"type\":\"->\",\"args\":[{\"attributes\":{},\"request\":{},\"query\":{},\"server\":{},\"files\":{},\"cookies\":{},\"headers\":{},\"stateKeeperStates\":[]}]},{\"file\":\"\\\/home\\\/vagrant\\\/Sites\\\/dev\\\/apiato\\\/vendor\\\/laravel\\\/framework\\\/src\\\/Illuminate\\\/Routing\\\/Controller.php\",\"line\":55,\"function\":\"call_user_func_array\",\"args\":[[{\"ui\":\"api\"},\"registerUser\"],[{\"attributes\":{},\"request\":{},\"query\":{},\"server\":{},\"files\":{},\"cookies\":{},\"headers\":{},\"stateKeeperStates\":[]}]]} ... yada yada yada
composer create-project apiato/apiato apicurl -X POST -H "Accept: application/json" -H "Cache-Control: no-cache" -F "[email protected]" -F "password=so-secret" -F "name=Mahmoud Zalt" "http://api.apiato.dev/v1/register"A row is actually inserted in users table but an exception is thrown afterward.
Same problem here.
A successful response after hitting user registration endpoint.
composer create-project apiato/apiato api - pulls apiato 5.0.0OS X 10.12.6
@jbaron-mx @FWidm Sorry about this, I missed creating new release x.x.* after upgrading the core package which caused this error.
Should work now after pulling Apiato 5.0.2
Thanks, works like a charm for me.
Most helpful comment
@jbaron-mx @FWidm Sorry about this, I missed creating new release x.x.* after upgrading the core package which caused this error.
Should work now after pulling Apiato 5.0.2