filmov
tv
Validate and save data safely with Laravel Request Objects

Показать описание
In this video we will expand on the simple API example we built in a previous video. Link to previous video :
Here we are going to use custom request objects to enforce data integrity and safely save data coming into the API. We will start with a simple example and then expand on the example to use Laravel’s custom Request Objects.
Timestamps:
00:00 Into
00:17 Show the problem
01:32 Create simple validation
04:58 Test simple validation
08:24 If this method works, why not just stop here?
09:04 Create Request Object
12:47 Update Controller To use Request Object
15:47 Test new code
Here we are going to use custom request objects to enforce data integrity and safely save data coming into the API. We will start with a simple example and then expand on the example to use Laravel’s custom Request Objects.
Timestamps:
00:00 Into
00:17 Show the problem
01:32 Create simple validation
04:58 Test simple validation
08:24 If this method works, why not just stop here?
09:04 Create Request Object
12:47 Update Controller To use Request Object
15:47 Test new code