|
Programming C, bash, Python, Perl, PHP, Java, you name it. |
|
Thread Tools | Display Modes |
|
||||
Laravel JsonApi
Hi everybody.
I'm currently in an dev internship, and I have to create APIs with php/Laravel/JsonApi. I use {json:api} and https://laravel-json-api.readthedocs.io/en/latest/ No problem with php and Laravel, but I'm stuck with JsonApi, with some id name issue ! Problem is, I'm the first in the enterprise to use JsonApi, so none of my colleagues can help me. I use the {json:api} official manual everyday, and I've tried everything described but can't find a functional solution in-there. I've asked on Stack Overflow, no response... Maybe someone knows how to use Laravel and JsonApi, or knows someone who could help...
__________________
ThinkPad W500 P8700 6GB HD3650 - faultry ThinkStation P700 2x2695v3 32GB 1050ti 3xSSD 1xHDD |
|
|||
It looks like you solved it yourself ;-) : https://stackoverflow.com/questions/...ravel-json-api
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
|
||||
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 : Code:
public function find($resourceId) { return $this->findQuery($resourceId)->first(); }
__________________
ThinkPad W500 P8700 6GB HD3650 - faultry ThinkStation P700 2x2695v3 32GB 1050ti 3xSSD 1xHDD |
|
|