And each session we are going to talk about comptrollers and the here can stay, instead of defining
all of your logic as closures in files, you may wish to organize this behavior using Khonsari classes.
And you can see here, this is the results that we're using, and instead of the Saraj, we have two
parameters.
The first parameter is that the user you're going to sit for your error and after that, you want to
set the function and a set of dysfunction.
You're going to return, for example, if you want.
But if you're using contraries, you can organize this behavior.
How so?
Latency.
And you you're going to organize your thoughts in this way.
And you want to put your first parameter, which is neutral.
And the after that's you're going to create a controller, you're going to name your consortia is wants.
And in this case, we have named this controller a welcome controller and we put the symbol after its
symbol.
You are going to put the name of the function that you're going to create instead of the open source.
So how can I explain, for example, these kinds of roads?
That's means.
If you put sludge as you go to the created concert, which is a welcome concert and instead of this
country, you are going to create the hum function.
And instead of this heart function, you can't return, for example, few, because when we were using
these kinds of roads, we we we were funfest for the world.
And after that, we were sitting the function inside of the function.
We were returning the view, for example, and thereby organizing by organizing this behavior.
And you thought you were going to pull the name of your controller here and you set off your controller,
you are going to create a home function in which you are going to return a view, which is the welcome
page.
And let us see what we're going to get in our control.
And as you can see, what's creating your own its will automatically generates it will compensate for
the loss file, which extends controller, as you can see here.
And they've told you the first thing you need to set your rules like this.
And you can see you are going to go in the air.
You go to your controller.
Once you said slash Exubera and create a function.
As you can see here we are inside of it.
Welcome.
Khonsari class.
And we have created the home function and the set of the home function.
We are going to return if you if you, for example, which is work on that.
Instead of defining our approach like this, we we may organize it by setting our rates like this and
create a controller.
And here, let us let us talk about the Laravel, seven point six controllers versus Larrivee, its
six controllers.
So once you're using LURVE, seven point six Kountouris, you need only two sets like this.
So no special thing or needs you want to set the length of your control.
You want to put the symbol in after it's Simborg.
You want to set the name of the function that you want to define inside of your controller Atari's if
you're using, for example, Larry Atonce X..
So this is what you're going to do.
And here the first thing you're going to do is to import the welcome controllers that inside of your
rochfort.
So as you can see, the controller is in the controller is even if you're in love, seven points.
And that in its context is storage in the app, HGP controllers directory and the service in Larrivee.
It wants X if you want, for example, to defund a controller it differently controller in your roads
you need to import disconcert instead of your rochfort and then you're going to create your rod like
these.
You want to set the euro.
Porti categorises here in the set of your Kabra says you want to put the welcome controller the name
of your contract and you're going to put the glass like this.
And after that you're going to put the harm and the function that you're going to the front instead
of your controller like this.
So let us consider.
And how to create a consumer and to create a consumer, you need us to tap these commands to make controller
and make sure to respect the chemicals nutshells.
That means the first letter of each word must be in our pictures.
And here you can say contraries.
We can say contraries can grow up related request logic into a single class.
And consumers are storage in the app HTP contraries directory.
So let us talk about comptrollers, and as you can see, we have just talked about it, so instead of
having these functions here in your file and you may wish to organize your file, and then we would
have a lot of court in your weblog, which is your first word file, and then regularly about
the controller and the here we are going to say, for example, in the area, going to say it's the
default page, which is the whitcome.
It was posted to.
But these hearings return with calm, if you will call.
And the first thing we are going to do here is to create a controller in which we are going to return
the welcome page instead of having this function.
Here we are.
We just to remove all these, we are going to remove or just function like this and say, welcome controller.
This is the controller that we are going to be creating in there.
Welcome.
Controller and Sheamus, the ED and aggressive, for example, hum like this, and that was creating
after creating, for example, your controller, your controller must appear in your app folder in the
HTP.
Let us click on Ultrasaurus and here you go, find your controller in such you use the console, which
is the default controller and all control is that we are going to be created, that we are going to
be creating, we extend from this controller and that if we want to use this, we are going to open
our gates, our internal gates.
So make sure to be inside of your basic lessons project.
As you can see here, you have this here.
It's looks like basic classes because you need to create a controller instead of your projects.
So we are going to touch our son, make a controller, and here we go.
Say welcome.
Control like this and do not forget to respect the common cause, and here are some controller and that
unglamorous alter.
So let us look at your controllers and you will see is literally a couple minutes, a couple seconds
rigourously.
And you can see right here and with a controller on site created successfully and directly, we welcome
control.
And if we click on a welcome controller, we don't have phones.
Let us close these.
We're going to find gloves will come controller, external controller.
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,
for example, the view in Piech.
So let us make fastforward with what we have here like this.
And we are going to take this function.
I'm going to take this function here.
I'm going to cut it.
I'm going to grab it and I'm going to put it in my way.
Come here like this.
And I'm going to add only I'm going to say public function like this.
And here I'm going to customize the name of my function.
I would say, for example, home and here.