Laravel Crash Course - API Resources
HTML-код
- Опубликовано: 30 сен 2024
- In this lesson we're going to learn about Eloquent API Resources. As the name suggest Eloquent API Resource is useful when you're building API.
So It's basically is a mechanism to transform our Eloquent model into JSON responses. It acts as a transformation layer that sits between our Eloquent models and the JSON responses that are actually returned to our application's users.
Bro when to use collection::make($data) and new userResource($data) is both method are the same???
thank you for explain, very usefull for me.
What happens to data from the database table stored as json ?
Thanks a lot brother ❤
Good job 👻
👍
Thank you. Saved my day.
You're welcome
Thanks a lot!!
No problem
Saved me a few good hours of research. Thanks a lot!!
confused
I did my best to explain it clearly. Sorry to see that you're confused.