filmov
tv
Use Laravel Resources to format data for API
![preview_player](https://i.ytimg.com/vi/_4L272WNOSI/maxresdefault.jpg)
Показать описание
In this lesson we will use Laravel resources to expose and shape our data so that it can be presented in the API requests. Laravel resources are a great way to transform data for presentation without needing to change the data itself.
Link to github:
Timestamps:
00:00 Into
00:19 Display the problem we will fix
01:32 Create and edit the post resource
04:04 Update the show route to use the new resource
04:40 Test resource is being returned from route
05:13 Create and edit comments resource
07:19 Edit post resource to use comment resource
08:30 Test data in Postman
Link to github:
Timestamps:
00:00 Into
00:19 Display the problem we will fix
01:32 Create and edit the post resource
04:04 Update the show route to use the new resource
04:40 Test resource is being returned from route
05:13 Create and edit comments resource
07:19 Edit post resource to use comment resource
08:30 Test data in Postman