19-08-2019, 10:49 AM
(This post was last modified: 19-08-2019, 12:01 PM by LePresident.)
OK, I went back to my internship after a week of vacation, and found where my error was.
I used artisan to generate an adapter, and I thought it was good, but nope.
artisan generates an empty find() method in the adapter, so ofc, this won't work.
I digged into the Laravel-json-api github, and found how to define the find() method :
Now, we're talking
I used artisan to generate an adapter, and I thought it was good, but nope.
artisan generates an empty find() method in the adapter, so ofc, this won't work.
I digged into the Laravel-json-api github, and found how to define the find() method :
Code:
public function find($resourceId)
{
return $this->findQuery($resourceId)->first();
}Now, we're talking




Join us on our TWC Discord channel

![[Image: 3137_29_08_20_6_07_21.gif]](https://board.twcclan.org/gallery/3137_29_08_20_6_07_21.gif)