Hello, friend.
Welcome back.
In a previous video, we successfully read all the data from our database and visibility in our piece
right there in our dashboard piece.
So now I want to do I want to go more deep.
And I hope you like it very much, because right now I want to use our total MVC pattern.
That means we will create one of the few will create one of the controller and also will create one
the model.
OK, so how can do that work combined all the things how can create another function.
I will show you with the live example for doing this.
First of all, here I want to do I want to create one of the another table for the category.
OK, I want to create on the table for the category and from the category being third from the category.
And I also want to get this category and visibility in another area.
So for doing this, I want to do want to add another menu.
So that is the main portion, as I told you, friend.
So here we have to do that is our dropdown.
So that is actually the file within install the additional authentication system.
That is our navigation dropdown and the navigation dropdown here.
You can see that is actually our one other file.
So I want to do I want to actually take another one so bitter I want to copied, copied and pasted.
So in particular, that area I want to do I want to add the all category.
OK, so this step up, one of the things I want to add and I namely the all category category.
So right now I didn't create any doubts of for the reasons I wanted to make it as right now as it now,
OK, I make it as empty and this activated here.
We don't need this.
I want to to remove it.
So that is our default one.
So it's perfect.
So that is are all categories.
OK, so that is our navigation and the dropdown and blade BHP now as a Savol and now if you'll refresh
it.
So it's still showing us it out is not defined.
OK, but I want to do I want to make it as a total empty OK, because if I didn't get anything out so
because to save all and now if you refresh it.
Yeah, obviously there is another one as all categories.
So for now I have to do and to create on the table want to create on the table in our database as a
lot of belayed here.
I want to create one of the tables.
If you want to create this table, you have to do we have to migrate it.
And also, as I told a friend, to have the two types, that is the one you can use, that you can do
whatever you can use.
Also the query builder.
So if you use that allocate one, then you have to create one of the model rather than if you only working
with this, you go rebuilder, then you don't need to use that model for some of the person actually
like to working with me.
Query builder.
So right now I actually want to share both of this with you for the reasons for our disk all category.
I want to create one of the model and also I want to create one of the database migration table.
That means here I want to create another migration table.
So if you want to do that work, you have to do we have to go to your appropriate file location.
That means that is our project directly as a level and the basic right.
So here you can actually create individually, you can individually create the model.
You can individually create one of the migration file.
And then if you want to create both of these with at the time, you can also do that work.
I show you then you have to do to down to the partition and then make I want to do one to make one of
the model make model.
I want to create on the model name as a category category.
OK, and also I want to make it at the time.
I want to create another migration file that will be the pen and then erm and that means it shall be
created one of the model and as a category name, and that means the modelling will be as a category
and also shall be created on the migration file as a category.
Now if you click as they enter now, consideration is now created under the model created successful
and also created another migration file that we see in the model folder.
You can see it's not created out of the category model.
So that is our category model and also it's created another migration file.
So that is our the migration file.
OK, and you can see it's not created out of the migration file as a category is perfect.
So that is the things I want to do.
Everything is now successfully created.
So not only do I want to add some of the feel like that is our database table in the migration that
is our new one as a category, that means it shall be created.
One of the categories table under the categories, table by default, that is the ID and the time is
spent.
So now I want to do I want to add some of the field.
OK, so better I to do to copy it.
So for our categories we don't, we need actually that user, I name it on the field as a user ID that
will be one of the.
User ID and also I want to do want to create another one as a category, name, category and good name,
so that will be our tool of this filename and user I.D. It will be as Intisar OK, I name it as a user.
It will be as Intisar and this category name for the category name, which will be as extreme because
that means it's already seen value of a friend.
And also if you want to use that sort, Dilek.
So they have also another officinalis of direct, if you go to that level official of site and here
if you start to dissolve, deflect, deflect, deflect.
So if you use that soft delek and then if you open it and here you can see if you want to use that Southdale,
then you have to do it into the model area here.
You have to have to use this one.
OK, that means this one that is of deflecting.
So for now, I want to do and copied.
I copied and now go to our models.
I have already created an older model as our category.
So the category idea here by default is a half factory.
So I want to add our new one.
I only want to change it as a use and the soft directing.
OK, and also if you use that sort of directing, you have to also use it.
And that means the look and I copied it.
And now in particular that area after this, I want to do sorry.
I want to add our this user that is also directing.
So make that you use it.
So here I successfully updated both of these.
So now I want to do to add it in our format.
That means here after this.
OK, after this I take another one, I copy it, I want to do and pasted.
So in particular that area I want to use our this of directing.
I copy it and it be as a result selecting.
OK.
So now I want to use it.
So perfect.
So here I use our ID.
That means our table name will be as a category and the categories that it will be on the idea and then
the Intissar in design will be for our user ID and they screen for the category name.
And also I use that self-selecting.
And also I want to do I to make our these two of this field as a fillable.
So if you go to our default one, that means that you are a user.
So this user is default on.
Right.
So I need to install that.
Laravel, we get by default this model.
And here you can see there is also another option for the protected as a fillable.
So right now I also want to use it, I copy it and I go to our models and there is our category.
So here after this, OK, after this, I also want to make our product field are protected field.
I want to make it affordable to have this field.
One will be as a user ID, I copy it, that will be as a user ID.
And also I want to add another protected field for the category name.
So now I want to do and to make it as a category name so that no, we don't need this I hope is very
much clear to friend.
So that's all you have to do.
If you are working with the model, that means if you want to use that you can do OK.
So now I successfully created one of the create a table as our category table and into the categories
table that the Tuffield or the user ID and the category name.
And also I make it as a software.
So now I want to do I want to migrate it.
OK, so when you migrated automatically so we created this table with all that field I show you like
that is our database.
Right.
So I want to do want to migrate out this new table.
So after this.
So here I want to do I want to because a PSP artisan and then migrate so be added something like that.
So now if you click as they enter now because different is now successfully created, our this category
is stable.
So now if you go here, if you now refresh it, yes.
You can create a new one as a category.
And for the categories I have created of the user ID, I want the category name that is created and
you can see is also added that both of these as updated that and another field as a delegated act.
So that is the two is visible because of all here I'm using as a software.
So if you don't you want to use that software, then it will be only created as a creator that OK and
then updated that.
So now the other field is added as a director.
That so perfect.
So you successfully created our table.
I hope you can well understand about it how you can create some of the table with using that migration.
And also, how can I sign all that?
Your table filled.
So there is a table filled I have assigned in our migration area.
You can see there is a user ID and that the category name.
So that is our user ID and the category name.
So now I also I want to do want to create another controller for our this category.
So if you want to create this kind.
I hope you already know about it then you had to do you have to write down as a PSP Ardizzone make and
then controller and then I want to do and to create the controller for the category.
I name it as a category category controller.
OK, name it as a category controller.
So if you want to create this controller, you have to write down the PSP Artisan Make controller.
And I now I want to create on the Kadugli controller and name it as a category controller.
Now if you click on the enter now concedes can successfully created on the controller in our controller
area, that means in our SCDP there is a controller that you can see it's created another controller
as a category controller.
So now I want to do when any user actually click in particular this area, it should be loaded.
And at that pace, OK, this will be loaded onto the category page.
So if you want to do that work, I hope you already know about it what exactly you have to do.
So first of all, I want to put on the link.
I want to put on the link on here.
So if you want to put that link, as I told you, friend here, you can use SoundCloud so better.
I want to do on the use of the cloud.
So if you want to add this out, what exactly you have to do.
So I want to do I want to create one of the Routt, I name it as a all category.
So whatever you want.
So now I name it as an all category one of the drought.
Right.
So we have to do we have to create this out.
So if you want to create this out, we have to work in our Web notario.
That means here.
Right.
So here I want to do I want to add one of the another out.
So after this after this better I want to put some of the comments for you.
It shall be as a category controller.
OK, category controller.
So that is a category controller.
See the category controller.
I want to use that out.
So that will be allowed.
And after that it will be as a gate and the gate area on the board of the name.
OK, so here I want to put on the name.
It should be as a category category SLAs.
All so this step up one of the name.
So here also all software that we have to do.
We have to add our controller that this will be just like that same friend.
But I also want to put some of the name, but I copy it.
OK, Upbeats, after this.
After this.
But I don't want to make you confused.
I copy both of this.
That means there is around and here I want to pull that out name.
It will be as this one I remove it so that will be our gate and that category all.
And I have also created another controller.
I have already created another controller as a category controller.
Right.
So I now we don't need this.
I remove it so that the category controller, I copy it and here I want to turn to paste it.
So that will be our category controller class and the category controller area.
I want to create one of the methode.
I want to be on the Materazzi all category.
OK, that means the all cat.
And also after that I want to put on the name.
So this name I have already created that name as all categories.
So now I want to copy it and here I name it as a D1.
So now if you click on the particular definition, it should be rejected throughout this category,
all pates.
And also here I added our category controller.
So we have to do we have to also include it.
Right.
So make sure you include it before.
I have already discussed about the things we do.
That is our contact controller, that is our app is TDP controllers and that is our new controller and
I have created as a category controller.
So now Underdo and to add that category controller, that means that is our app app and there is TDP,
the controller and then our category controller.
So first of all, you have to load it and after that you have to add it.
Right.
So that is our category controller.
I have created and then there is a category and then category controller with the category controller.
Now we have to do we have to create this method as they all get right.
So we have to create it now.
Go to our category controller into the category controller area.
I want to do are to create our this method.
So if you want to create this method, first of all, what exactly you have to do?
You have to make it as a public like public and then function public function.
And our method name will be as all cat.
So now I name it as all.
So that will be our function style right into this area.
Want to do and returned.
I want to return on the view space.
So if the view Pesquería I want to do, I want to create, I want to make this specific, then it should
be better actually in our view area.
So that is our view in the video to create the folder and to create one the folder as admin, OK, and
do the admin folder.
I want to create another folder so we can actually segment everything part by part.
Then it'll to be very much easy to you when you actually put it on the last project.
And I name it as a category, so that is actually a good practice.
OK, so into the admin folder, I have created another folder as a category.
It's easy.
You are weak right category and also into the category area that was in the category folder.
I want to create the new file and I name it as a whatever I want and now I name it as index dot, dot,
dot PSP.
Now I save it.
So now this base I want to load.
OK, so this page I want to load.
So if you want to add this then here we have to add it right through to the viewer.
I want to do want to add it.
That means I have already to the very I have created the folder, the admin into the admin folder.
I have created another folder as a category.
OK, make sure spelling is correct in the category folder I, I have created on the file as an index.
Right.
So that will be our view file.
That means that is our view into the view.
I have created admin folder, the category folder in the category.
I have created that index plate.
So that is our index.
Right.
So here I simply load out this space.
So now if you want to load it, that means you want the visibility.
So make that you're after that, you have to use that column.
OK, semicolon.
So here, make sure you use it.
So that's all you have to do.
Now if you click on the save all and now if you refresh it.
Now go to our all categories.
Yeah, you can see it's a perfectly loaded our all categories because of all it's not totally blank.
So here I want to do it'll be just like our this dashboard.
OK, but I copy everything.
I copy everything from here and into the index.
I post it.
So right now that is all the data.
So here I don't need this data.
I remove it, I make it as a clean OK, I make it as a clean, I just simply remove everything from
here.
And also there is a counter.
I don't want to use that count.
And here I only want to visible.
I only want the visible as our name as a whole category.
OK, still we display all category.
Now let's check this out.
If you're not disabled and now if you refresh it, yeah, you can see it's not showing as all category.
That is our dashboard piece and that is our all category space.
Perfect.
And there is also one of the spin so determined to do under you that is pain.
Also here, I don't need this anymore.
It is a save all.
And now if you refresh it.
Yeah, it's not gone so far and I hope is very much clear to you.
So that is our all category here.
I have the add one of the round.
Right.
So I keep it again then it'll be very much easier to you.
So in particular, this area I have created one that I have named as all category.
Let me see.
Did the Web really I have created on the controller and that is our name Lord, I have already declared
is all category.
I have created one of the controller as the category controller.
That means used to be addicted to our this controller area.
This that is actually one of the method.
Right.
And is subjected to our this method that is know category controller, this method.
And here I return on the view base I have created in the blue folder as the admin folder category folder
and that is our file.
So I simply return this file.
So now you can see it's perfectly loaded and our equal part as a category, all because of all I have
already added that name.
So that is are all category name.
I have already added that part will be as a category all.
Now you can see snaffling as a category all.
So now I want to do I want to add one of the form so into the form area.
I want to do I want to add one of the validation so you can add some of the validation into the form
of the next video.
I will show you that things with a live example.
So thanks for watching and I will see you in the next video.