Hello, friend, welcome back.
In a previous video here, I have played on the guard and I just need me to add the cards, right?
So that is one of the interface.
So that is our main interface for the default user.
So right now and to do the added app for our admin.
So here, friend, make that you updated that namespace right now that is the word, especially the
guards.
Right.
That means that is in our app.
So here you have to update the Thami space.
So that will be no app and the app and the result cards folder.
OK, that is oligarch's folder in particular.
That area have created around the guards and administrative guards.
And I'll make that you update as admin and then institute guards.
Perfect.
And it will be extended our main guard because that is actually our main guard.
Right.
So here we successfully did that work.
So right down here, we don't need to do anything that she admitted that namespace space and the interface
name.
So.
Right.
Close it.
So there is always total guard.
So here also you don't need this.
That is the stateful and there is our namespace for our main one.
That is the default.
And we just copy everything from the the main one and they will create another one for our admin actually.
OK, and now that is authenticated session and without hesitation, as I told you friend, there's automatic
processing of the controller.
So that is actually the file location into the Laravel, the multi vendor, the Laravel folder, the
forty five.
Right.
So now that is the our station I to do and to copy this controller.
I copy everything from here and now.
I have already created all the controller in our controller area.
That means in our EDP there is a controller there, the admin controller, so no one don't update it
here, only we have that namespace and then the class.
OK, so better.
And do I want to pass it on here.
OK, so now to update that namespace.
So that will be as a name space on top that namespace.
And then and also there is a controller that will be as admin controller, not this one nettelbeck that
controller.
Perfect.
So I don't we don't need this, I remove it.
OK, so here I remove it.
So that will be our namespace.
And then our class name, our admin controller should be extended our default controller as a controller
and that is are protected by the card.
Perfect.
So friend, here we have to do we have to create all the things that is in our controller here.
We have to create the method for locking.
OK, that means the admin locking.
So that is that key step is I hope you enjoy it so that it is step by step process.
You have to floor right now.
You don't need this a closet and there is no way to know how to do and to work with this had been controllers
that had been controller.
I want to create one of the method.
OK, so here I am to declare all of the method after that constructor that is our guard is now loaded.
So here I want to create the map before for creating this method and upgrade our webroot.
If you go to that web so that the default one.
Right.
So this little one for our user.
So no one to do want to add another one for our admin.
So here I want to update it at this functionality.
That means I did this out.
So if you want to do that, work better, faster follow on to do.
I want to create one of the group that is allowed group.
So that is our allowed and then the group look at the real group and the real group area.
First of all, I want to add all the prefix, OK, and on the prefix.
So that will be another prefix and prefix will be the admin, I name it as admin.
And also here for this I happen to have to create one of the Metellus.
I will create these things later.
So I might want to add on Domitilla.
OK, I may meet with the minister and with the minister here.
I don't want to name it, so I want to add that name.
Name will be as an admin, not admin.
OK, so here I am to step on the Middler, and after that I want to add that function.
So that will be the function.
So our function name.
So make that you add that semicolon.
So here I created the group, so to the group I create one of the round one will be as a get out.
That means get my thoughts and get my total on the load.
That will be the slash lockie.
Right.
So by default that the logging.
I also want to add that for that mean also will as I've been logging Sonando as a get logging and into
the gate logging area in Laravel eight, I think you already know what exactly the things you have to
do here.
And to add on to meet our methode, that means our controller.
So have a look around the controller as admin controller.
So right now, first of all, that is our admin controller.
I have to use it on here.
So if you want to use this admin controller.
So first of all, we have to do we have to load this admin controller.
Right.
So here we have to use it to know what to do and to use it.
So that is our use.
And then app and then the EDP.
Then there is the DP and then the controller
controller.
Right.
So that is actually the controller folder and into the controller folder.
I have created one of the controller as admin controller.
So here at this one, I hope it's very clear to.
So now we can actually use this admin controller and would that be the controller I want to do and to
create one of the methode.
So here after that, I don't want to control the output of the logging from logging and then form.
OK, Naimi does a logging method, so here I created one and also to add another one for the Easter
cause.
Here also we have to add some of the validation that is after that logging, would that appropriate
admin username and password.
So I have already insert some savings of the data.
So that's on the email address and also to have some of the password.
So we need also one of these traumatized.
So for the reasons here, I copied, I copied and now I based.
It will be as the same name as a login.
So now I want to insert the data that means from here on the inside it.
So that will be the post method in your admin controller.
I want to access that is traumatized.
OK, that will be accessed.
That is stromatolite.
And now here I put that name, I name this out.
I named this, so does the admin.
I mean, dot logging.
OK, so this type of one of the name I want to add, and that is our Bifold one.
So this I want to turn to the two things I want to access with the same dashboard.
So I copied everything will be very clear to you why I'm actually using it.
So here there is a two one, so one four.
I want to do one to create into that schema, into this camera.
I want to add another one for the admin and also to verify it.
And it will be added on the slash as the admin slash and then dashboard.
OK, so it'll be as admin slash dashboard and then functions the done view with the same dashboard either.
Then you can also load another one for the different pages.
And that means if you want to add that different template for the admin, then you can use it happens
here in the return area.
You have to change the page.
So right now, by default, everyone, everything.
I want to use it to the same pace that we in or out, that is our default one sorry, not the road,
the resources, and that is our dashboard.
So as I told a friend, if you want to load the default page that the default team for admin, then
you can just simply dictated from this position.
So that will be for our admin.
And here also you can return it with the different for the user.
OK, so this will be for the user.
And as I told you, by default, this user means actually using that website now to do better, mamita
the web.
So that will be as a way, as I told you, friend, if you go to that or config into the config, if
you go to that, all the you can see by default that is Legard as a Web site.
So by default actually is using this web so that no one to do and to manage it as a web and then the
admin.
So that will be as a webcast and then which will be verified with the dashboard function like that,
just like Sam and written view of the dashboard that that's right now.
And to pass it to a specific dashboard that this space.
So also as a tool for that user to load another template, then you can add this template and here you
have to do have to read and view this space.
OK, right there.
I know I'm actually using both of this as the same.
So no one will be for the Web and there will be for admin.
So no one to do and to create our this method that this method in our admin controller.
So now go to our admin controller and do the admin controller after this constructor here.
I want to create the method as a public and then function and then our method name as a logging form.
So that will be our method.
So here simply a return on the view based upon the return on The View.
Sorry, we've done view, I return view of the order based upon the art and the art here if you go.
You can see there is a view there is an awful, awful lot that is the logging.
OK, so here I want to want to use it.
So that is a logging.
So name it is a logging.
That means logging sorry, dot, dot, dot folder and the logging base and the logging base here.
I want to do want to pass our guards.
So that will be the different guards.
That will be our admin guards.
Right.
I have already created one of the guards for the admin so our guard will be as admin.
OK, I want to use that admin guard, Redfearn.
So now we have to do we have to update these logging.
Like if you go to our old folder into the folder, there is a logging blade, the logging blade here.
You can see that is our same as email and password.
I also want to use the same thing.
So for the reasons here, we have to update it that out that means into this action where we have to
declare that guard.
That means we need to be as a admin then to be using as a and I mean dashboard and then you should be
using the default one.
So here into the action area, we have to set it so that I remove it.
So here I want to do I want to add better before this.
I can be for this.
I want to add, as you said, OK, I want to setup it said our what it said our guard.
Right.
So here I am using that card.
So it said our guard, I copy it.
So that will be as a guard.
So it is guard.
I want to add that question mark and you what are you what it will be to so one will be with this guard.
I want to learn to contribute and compete with the last logging.
So I'll be logging.
And then also another one will be our these allow logging.
OK, that will be for our athletes.
We check it, there's our logging on.
Not so understood by logging that that will be as our admin Garceau here and it be as admin.
So it'll be just like actually like that the logging.
Right and all that will be perfect to work.
So this one is for our this election will be worked for without logging.
And I than if you add that another guard as the admin.
So I have already created all the guard for the admin.
So when you use that this guard.
So that is the guard I have actually added so that additional guard and then slashed logging.
OK, that means that will be as admin, that means our guard name and then slash our logging so that
both of these issues will be settled.
OK, so here I simply updated that part.
I hope friend is very much clear to you.
Perfect.
So here we successfully complete that part and now our next step will be and we have to support our
all that a guard like here.
Here you can see that is actually the redacted Two-Factor authentication.
That is our attempt to authenticate it.
So if we did these two of this also using our stateful guard, that means here that is also using that
our you can see that is actually stood full guard.
So now I want to do I want to update this instead.
What that means here, if you go, that means that is actually one of the fireguard.
There is a redirect to factory.
So here you want to find out.
So here we have to add both of these.
We have to add that reduc and that authenticated to authenticate, attempt to authenticate.
We have to add both of these in our T section.
And in the forty five here, we have to add it.
OK, so first of all, I want want to find out this file so you can find out this file.
So that will be right now and minimize it.
So here I minimize it.
So that is into the vendor.
If you go to that vendor, if you go to that level.
So here that is actually the Laravel.
You can see there is a lot of it.
If you go to that lot available to the Fortify and there is a SLC that the action and here you can see
that is the attempt to authenticate.
And also there is another one as it is actually the reject factory authentication.
So that is actually two this file class.
Right.
So here you can see that is actually the showing as a reject and then actions that is redacted to factories
into that appropriate dislocation.
That is actually the location.
So right now, I want to do I want to create two of this file.
So if you go to and that appropriate file location folder.
So I want to do want to open it so here you can see the of the file tonight.
No, I don't copy it.
So from the Daftari or defy the assertion, the actions I copy attempt to authenticate and also copy
that redact to factor authenticate a copy of this and now go to our project.
So there is a positive go to that our app and that is our action and that they are fortified.
And here I simply bill both of this.
OK, so make sure you update both of this so know what to do and updated that namespace.
So here right now I say Voll so here I remove it.
So if you now go to our actions and the actions that is fortified, there is an attempt to authenticate.
So before that was actually Laravel, the actions right now namely has become changed.
So now we have to update it.
So that is, you know, I've seen this app and then our actions.
Right.
That is our actions folder.
So make sure spelling is correct.
That is the app and then our actions folder and there is a forty five.
So here we have that name, MySpace and then the forty five.
OK, that will be as refortify.
Perfect.
And also is using that stateful guards perfect revalidation.
Perfect.
That is a guard and really means so also that are adding to authenticate guards.
Now still be perfectly getting this data and then the guards just liquidate.
Everything will be just like that.
OK, so here everything will be Jasem so you don't need to do anything.
So that is all remember.
And then authentication fell.
OK, so that you'll remember authentication felt perfect.
And also we have to do we have to update our another one.
I click on sales and all the other one as a redirect to factor.
So also here we have to do we have to update our namespace for the redirect to factory authentication.
There is a namespace, so namespace will be just like them.
So that will be as the app sorry, that will be the app and then the actions, actions and then after
that action that will be the for the file.
So that will be as a fortify and the result is stateful guard has validation.
Everything is already made here.
You don't need to do anything.
OK, so here you don't need to do anything.
Perfect, so here I bet that part of the respect to adjust on to victory, to never remember took in,
so everything will be just like that.
So here I added both of these and only I updated that namespace.
So here I only updated namespace for the reader to factory authenticate and also attempt to authenticate
because of all of this, both of these actually using for our this one.
That means that is actually our stateful cards.
Right.
So that is actually both of these using this interface.
So for the reasons here, make sure you add both of these into the action.
In our main application for the very area, I simply add both of these.
Perfect.
So right now, we don't need this.
I can get a Savol.
No, I close it.
So now we have to do we have to add some another step.
We have to create some of the Middler and also we have to update our providers.
If you go to that, our providers into the cloud service provider, secrecy by default that is actually
providing this home.
That is our dashboard.
Right.
So this home there is the constant.
So here also we have to we have to update it so better and to continue this process.
In our next video, I'll show you that things with a live example.
So thanks for watching and I'll see you in the next video.