Closed geraldokandonga closed 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' ] ]));
return $this->reply()->errors(Error::create([ 'title' => 'Bad Request', 'detail' => trans($response), 'status' => '400', 'meta' => [ 'key' => 'email', 'pointer' =>
] ]));
You need to use Error::fromArray().
Error::fromArray()
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'] ]));