cloudcreativity / laravel-json-api

JSON API (jsonapi.org) package for Laravel applications.
http://laravel-json-api.readthedocs.io/en/latest/
Apache License 2.0
780 stars 109 forks source link

Error::create #539

Closed geraldokandonga closed 4 years ago

geraldokandonga commented 4 years ago

I am facing an error on the following

Returned Error => local.ERROR: Call to undefined method CloudCreativity\LaravelJsonApi\Document\Error\Error::create()

return $this->reply()->errors(Error::create([ 'title' => 'Bad Request', 'detail' => trans($response), 'status' => '400', 'meta' => [ 'key' => 'email', 'pointer' =>'/data/attributes/email' ] ]));

lindyhopchris commented 4 years ago

You need to use Error::fromArray().