Hello everyone, hope you are doing well and staying safe.
When designing the API, one of the most important things is to design the API in a way t...
For further actions, you may consider blocking this person and/or reporting abuse
Nice. I use Laravel Responder for this. It also returns uniform response for Laravel base response or errors like firstOrFail(), abort() etc.
You can check it out here github.com/flugger/laravel-responder
Hmm, that's also not bad, But I guess, to use that, We must be using Fractal Package, which is no longer required with the New Version of Laravel as we already have the functionality of Fractal in laravel core now
Can you point me to that?
I believe Laravel response has the dependency on github.com/thephpleague/fractal which is no longer required as We have Laravel Api Resources now
laravel.com/docs/8.x/eloquent-reso...
Oops, didn't know that's what you are referring to. Its been there for a while. Since 5.5
I fractal works for me.
yeah, thats true
How can I use this in laravel 11. It's doing anything in it.
is this handler also can use to handling the normal (web) request
Updated the code with one I am using, Yes, I should handle web request normally now
That's great, thank you very much.
One thing is that you are providing missing documents
EmptyResource,
EmptyResourceCollection
Thank you so so much!!!!!