1
00:00:08,980 --> 00:00:16,330
And each session we are going to talk about comptrollers and the here can stay, instead of defining

2
00:00:16,390 --> 00:00:25,510
all of your logic as closures in files, you may wish to organize this behavior using Khonsari classes.

3
00:00:26,740 --> 00:00:33,370
And you can see here, this is the results that we're using, and instead of the Saraj, we have two

4
00:00:33,370 --> 00:00:34,410
parameters.

5
00:00:34,630 --> 00:00:40,600
The first parameter is that the user you're going to sit for your error and after that, you want to

6
00:00:40,600 --> 00:00:44,170
set the function and a set of dysfunction.

7
00:00:44,170 --> 00:00:48,190
You're going to return, for example, if you want.

8
00:00:48,580 --> 00:00:52,960
But if you're using contraries, you can organize this behavior.

9
00:00:53,050 --> 00:00:54,520
How so?

10
00:00:54,520 --> 00:00:55,300
Latency.

11
00:00:55,660 --> 00:00:58,360
And you you're going to organize your thoughts in this way.

12
00:00:58,720 --> 00:01:01,690
And you want to put your first parameter, which is neutral.

13
00:01:02,230 --> 00:01:07,330
And the after that's you're going to create a controller, you're going to name your consortia is wants.

14
00:01:07,720 --> 00:01:15,300
And in this case, we have named this controller a welcome controller and we put the symbol after its

15
00:01:15,300 --> 00:01:15,740
symbol.

16
00:01:15,820 --> 00:01:21,600
You are going to put the name of the function that you're going to create instead of the open source.

17
00:01:21,880 --> 00:01:25,980
So how can I explain, for example, these kinds of roads?

18
00:01:26,410 --> 00:01:27,160
That's means.

19
00:01:28,280 --> 00:01:35,990
If you put sludge as you go to the created concert, which is a welcome concert and instead of this

20
00:01:35,990 --> 00:01:39,080
country, you are going to create the hum function.

21
00:01:40,500 --> 00:01:46,950
And instead of this heart function, you can't return, for example, few, because when we were using

22
00:01:46,950 --> 00:01:51,380
these kinds of roads, we we we were funfest for the world.

23
00:01:51,570 --> 00:01:55,850
And after that, we were sitting the function inside of the function.

24
00:01:55,860 --> 00:02:03,690
We were returning the view, for example, and thereby organizing by organizing this behavior.

25
00:02:04,020 --> 00:02:09,860
And you thought you were going to pull the name of your controller here and you set off your controller,

26
00:02:09,870 --> 00:02:16,830
you are going to create a home function in which you are going to return a view, which is the welcome

27
00:02:18,180 --> 00:02:18,750
page.

28
00:02:18,900 --> 00:02:21,980
And let us see what we're going to get in our control.

29
00:02:22,710 --> 00:02:29,500
And as you can see, what's creating your own its will automatically generates it will compensate for

30
00:02:29,530 --> 00:02:33,720
the loss file, which extends controller, as you can see here.

31
00:02:34,050 --> 00:02:39,090
And they've told you the first thing you need to set your rules like this.

32
00:02:39,630 --> 00:02:43,600
And you can see you are going to go in the air.

33
00:02:43,670 --> 00:02:45,930
You go to your controller.

34
00:02:46,260 --> 00:02:50,070
Once you said slash Exubera and create a function.

35
00:02:50,190 --> 00:02:53,290
As you can see here we are inside of it.

36
00:02:53,310 --> 00:02:53,750
Welcome.

37
00:02:53,760 --> 00:02:54,180
Welcome.

38
00:02:54,180 --> 00:02:55,230
Khonsari class.

39
00:02:55,470 --> 00:03:00,120
And we have created the home function and the set of the home function.

40
00:03:00,240 --> 00:03:05,670
We are going to return if you if you, for example, which is work on that.

41
00:03:06,900 --> 00:03:14,370
Instead of defining our approach like this, we we may organize it by setting our rates like this and

42
00:03:14,370 --> 00:03:15,870
create a controller.

43
00:03:19,620 --> 00:03:26,800
And here, let us let us talk about the Laravel, seven point six controllers versus Larrivee, its

44
00:03:27,000 --> 00:03:28,070
six controllers.

45
00:03:28,440 --> 00:03:35,250
So once you're using LURVE, seven point six Kountouris, you need only two sets like this.

46
00:03:35,520 --> 00:03:39,710
So no special thing or needs you want to set the length of your control.

47
00:03:40,230 --> 00:03:43,230
You want to put the symbol in after it's Simborg.

48
00:03:43,230 --> 00:03:49,800
You want to set the name of the function that you want to define inside of your controller Atari's if

49
00:03:49,800 --> 00:03:52,300
you're using, for example, Larry Atonce X..

50
00:03:52,530 --> 00:03:54,480
So this is what you're going to do.

51
00:03:54,930 --> 00:04:03,540
And here the first thing you're going to do is to import the welcome controllers that inside of your

52
00:04:03,540 --> 00:04:04,160
rochfort.

53
00:04:04,350 --> 00:04:10,920
So as you can see, the controller is in the controller is even if you're in love, seven points.

54
00:04:11,250 --> 00:04:21,030
And that in its context is storage in the app, HGP controllers directory and the service in Larrivee.

55
00:04:21,030 --> 00:04:27,750
It wants X if you want, for example, to defund a controller it differently controller in your roads

56
00:04:27,990 --> 00:04:35,280
you need to import disconcert instead of your rochfort and then you're going to create your rod like

57
00:04:35,280 --> 00:04:35,700
these.

58
00:04:35,880 --> 00:04:37,230
You want to set the euro.

59
00:04:38,040 --> 00:04:43,980
Porti categorises here in the set of your Kabra says you want to put the welcome controller the name

60
00:04:43,980 --> 00:04:47,180
of your contract and you're going to put the glass like this.

61
00:04:47,340 --> 00:04:53,850
And after that you're going to put the harm and the function that you're going to the front instead

62
00:04:53,850 --> 00:04:55,890
of your controller like this.

63
00:04:56,190 --> 00:04:57,300
So let us consider.

64
00:05:00,950 --> 00:05:09,380
And how to create a consumer and to create a consumer, you need us to tap these commands to make controller

65
00:05:09,620 --> 00:05:12,960
and make sure to respect the chemicals nutshells.

66
00:05:13,190 --> 00:05:18,550
That means the first letter of each word must be in our pictures.

67
00:05:18,920 --> 00:05:21,440
And here you can say contraries.

68
00:05:21,440 --> 00:05:27,800
We can say contraries can grow up related request logic into a single class.

69
00:05:28,070 --> 00:05:33,770
And consumers are storage in the app HTP contraries directory.

70
00:05:35,640 --> 00:05:43,410
So let us talk about comptrollers, and as you can see, we have just talked about it, so instead of

71
00:05:43,410 --> 00:05:53,580
having these functions here in your file and you may wish to organize your file, and then we would

72
00:05:53,640 --> 00:06:00,000
have a lot of court in your weblog, which is your first word file, and then regularly about

73
00:06:02,880 --> 00:06:09,410
the controller and the here we are going to say, for example, in the area, going to say it's the

74
00:06:09,420 --> 00:06:11,310
default page, which is the whitcome.

75
00:06:14,920 --> 00:06:16,170
It was posted to.

76
00:06:23,780 --> 00:06:27,860
But these hearings return with calm, if you will call.

77
00:06:31,940 --> 00:06:38,260
And the first thing we are going to do here is to create a controller in which we are going to return

78
00:06:38,270 --> 00:06:41,870
the welcome page instead of having this function.

79
00:06:41,980 --> 00:06:42,980
Here we are.

80
00:06:42,990 --> 00:06:52,150
We just to remove all these, we are going to remove or just function like this and say, welcome controller.

81
00:06:52,370 --> 00:06:55,790
This is the controller that we are going to be creating in there.

82
00:06:55,820 --> 00:06:56,570
Welcome.

83
00:07:00,070 --> 00:07:07,870
Controller and Sheamus, the ED and aggressive, for example, hum like this, and that was creating

84
00:07:07,870 --> 00:07:15,460
after creating, for example, your controller, your controller must appear in your app folder in the

85
00:07:15,460 --> 00:07:16,360
HTP.

86
00:07:17,530 --> 00:07:23,800
Let us click on Ultrasaurus and here you go, find your controller in such you use the console, which

87
00:07:23,800 --> 00:07:29,830
is the default controller and all control is that we are going to be created, that we are going to

88
00:07:29,830 --> 00:07:40,330
be creating, we extend from this controller and that if we want to use this, we are going to open

89
00:07:40,330 --> 00:07:42,420
our gates, our internal gates.

90
00:07:42,430 --> 00:07:46,660
So make sure to be inside of your basic lessons project.

91
00:07:46,840 --> 00:07:49,750
As you can see here, you have this here.

92
00:07:49,750 --> 00:07:55,750
It's looks like basic classes because you need to create a controller instead of your projects.

93
00:07:56,020 --> 00:08:04,110
So we are going to touch our son, make a controller, and here we go.

94
00:08:04,150 --> 00:08:05,470
Say welcome.

95
00:08:08,790 --> 00:08:16,950
Control like this and do not forget to respect the common cause, and here are some controller and that

96
00:08:16,990 --> 00:08:18,140
unglamorous alter.

97
00:08:18,510 --> 00:08:25,980
So let us look at your controllers and you will see is literally a couple minutes, a couple seconds

98
00:08:26,190 --> 00:08:26,770
rigourously.

99
00:08:26,790 --> 00:08:34,470
And you can see right here and with a controller on site created successfully and directly, we welcome

100
00:08:34,470 --> 00:08:34,890
control.

101
00:08:35,330 --> 00:08:39,150
And if we click on a welcome controller, we don't have phones.

102
00:08:39,360 --> 00:08:40,950
Let us close these.

103
00:08:41,250 --> 00:08:44,970
We're going to find gloves will come controller, external controller.

104
00:08:45,160 --> 00:08:53,400
As you can see in here, you can see we have already put out this and it is so easy if we want to install,

105
00:08:53,400 --> 00:08:56,880
for example, the view in Piech.

106
00:08:57,180 --> 00:09:01,680
So let us make fastforward with what we have here like this.

107
00:09:02,010 --> 00:09:04,490
And we are going to take this function.

108
00:09:05,460 --> 00:09:07,980
I'm going to take this function here.

109
00:09:08,970 --> 00:09:10,680
I'm going to cut it.

110
00:09:10,680 --> 00:09:14,190
I'm going to grab it and I'm going to put it in my way.

111
00:09:14,190 --> 00:09:15,720
Come here like this.

112
00:09:16,140 --> 00:09:19,980
And I'm going to add only I'm going to say public function like this.

113
00:09:20,370 --> 00:09:24,060
And here I'm going to customize the name of my function.

114
00:09:24,060 --> 00:09:26,940
I would say, for example, home and here.
