it's true it looks like the same but it's not really an API resource is highly customizable and has plenty of other options you can use like conditional relationships or conditional metadata also, you can change the response witch a thing I always do besides that you can reuse it everywhere else and you don't have to retype the format you want your response to look like I hope this helped
Jan 11, 2021
1
Level 2
What are the differeneces between Api Resource Response and Http Response
I wonder what are the main logic behind api resources except adding meta data to response.. And what are the differences between api resource collections and http json responses. I get same response when I get http json response by returning
return response()->json($model, 200)
with by returning
$jobModel;
return new JobResource($jobModel);
Where can I find usage examples and best practices for api resource collections?
Level 16
Please or to participate in this conversation.