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
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
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