Level 50
I guess someone's added a helper function that is just a shorthand for return response()->json([]);. Without knowing the context it's hard to say for sure though :-)
1 like
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
hello folks , I had checking an open source arm built with laravel and I found this expression and I didn't understand how it works .
return api([
'saved' => true,
'id' => $result->id
]);
what return api this is the first time I see it ?
I guess someone's added a helper function that is just a shorthand for return response()->json([]);. Without knowing the context it's hard to say for sure though :-)
Please or to participate in this conversation.