Day: May 16, 2018

Laravel API Resource for API end point

I need to get the Json objects when I call the Get request http://myapp.com/api/products API end point First thing you have do is create the normal controller using following artisan command

And create the Product model too Then you create the resource controller at App\Http\Resources location

Which will produce thw folllwong code

[…]

Read more