1
00:00:00,600 --> 00:00:05,310
We are going to look through inside our application and improve it.

2
00:00:05,310 --> 00:00:08,340
So let's see where we need to improve.

3
00:00:08,370 --> 00:00:15,330
The first one is when I click on this icon to update or to render the form for update.

4
00:00:15,330 --> 00:00:16,350
Let's have a look.

5
00:00:17,460 --> 00:00:23,310
So when you see this kind of message, it simply means that we are using a variable in a template,

6
00:00:23,310 --> 00:00:25,520
but we are not passing in that.

7
00:00:25,530 --> 00:00:31,650
So let's have a look where we are wrangling the form is called the User Details template.

8
00:00:31,650 --> 00:00:37,410
So let's look at the user controller and let's have a look.

9
00:00:38,680 --> 00:00:46,030
And this is a controller that renders a single user and you can see that we are passing in the user,

10
00:00:46,030 --> 00:00:49,260
but we are not passing in the error property.

11
00:00:49,270 --> 00:00:55,690
So by default we need to make use of error as empty and this one will fix that.

12
00:00:55,690 --> 00:00:57,850
So when I refresh it, let's have a look.

13
00:00:59,270 --> 00:01:01,730
And you can see that it worked fine.

14
00:01:01,760 --> 00:01:06,560
The next one is we need to display the error in case we have one.

15
00:01:06,560 --> 00:01:10,520
So I'm going to copy this one and then paste it here.

16
00:01:10,700 --> 00:01:15,590
But for the message, we are going to use this message as error.

17
00:01:16,570 --> 00:01:19,990
Dot message and let's remove this one.

18
00:01:20,110 --> 00:01:23,260
Now we have improved that one.

19
00:01:23,290 --> 00:01:25,840
The next one going to be the log in.

20
00:01:26,110 --> 00:01:27,640
Let's look out.

21
00:01:28,580 --> 00:01:30,970
And let me click on Look In.

22
00:01:30,980 --> 00:01:36,200
You can see that I'm not providing the email or the password and I got this message.

23
00:01:36,200 --> 00:01:39,110
So let's go ahead and then render the template.

24
00:01:39,470 --> 00:01:43,310
So let's go to use this controller and here we go.

25
00:01:43,310 --> 00:01:51,110
Let's look at the log in functionality, which is this, and you can see that we are returning the JSON

26
00:01:51,110 --> 00:01:51,500
data.

27
00:01:51,500 --> 00:01:54,470
So we are going to use the same template here.

28
00:01:57,100 --> 00:02:04,620
And I'll add this message as email and passwords are required.

29
00:02:04,630 --> 00:02:06,910
So let me remove this one.

30
00:02:07,300 --> 00:02:16,240
Now, when I try to look in with empty data, let's have a look and we have it as email and password

31
00:02:16,240 --> 00:02:18,220
fields are required.

32
00:02:18,460 --> 00:02:19,030
All right.

33
00:02:19,030 --> 00:02:20,000
It worked fine.

34
00:02:20,020 --> 00:02:24,700
The next video, let's go ahead and then populate the user's post.

