Hello, friend.
Welcome back.
You know, previous video I have discussed about that Pasig Nation, I hope you will understand about
how you can add that designation in Lavallade project to now in this video.
I want to discuss about this user.
And here you can see, friend, it's not showing as a user want, user want and for everyone because
of all here, I have created all that category with all this user.
So that is the user and by default, this ID as a one.
Right.
So now I want to do I want to visible that name.
Like, if you go to our table, that means there is a user table and they use a table here.
Consider the idea.
There is one idea.
So that is our I right now I'm talking with the admin and for this admin actually I do one.
Right.
And also if you go to our database again and the database, if you go to that, our categories and the
categories here, I have already declared on the table as a user ID right there is on the table filled
as a user ID.
So now I want to do I want to join two of this table.
I want to join our categories table to our these users table.
And then I want to match with our two of this feel that this user I.D. will be matched with our this
card user.
That is that user table decided OK, will still be match then I want to do to get this name.
So here you can do that work with both of these.
What you can do that work with.
They look into our and also you can do this work with using that query builder.
So I'll share both of these with you.
Then everything will be very clear to you.
So friendly.
As I told you when you were working with this, you look into one and then we have to do we have to
work with the model.
Right.
Like if you go to our project right now, but I remember everything, OK, remove everything, then
it will be better.
I remove everything and I just make it clean.
So right now, if you go to our view, that means that is the position I actually declared in our view.
That means if you go to our there is a root out will be needed and then that is our another file.
That is all layout's.
That is a profile.
And in the view area into the category here, I have created one of the index cards, HTML.
Right.
And do the index statistical.
Here you can see friend, I only display with this category as a user.
I do feel that is right now this user I feel is visible that that is our user.
I do want and for the reasons all that one idea is visible.
So now I want to do I want to join two of these.
They want to join our this category table to our user.
So if you want to do that, work with using that, you look into what and then we have to do we have
to work in our model.
That means I have also created one of the model.
I if you go to our model and you can see that the category model similar, the category model here we
have to do we have to create one of the function.
OK, so I show you like here after this, after this I want to do the creator of the function and I
just named that function as a public public and then function and then public function and I name it
as a user.
So whatever he wants right now, I name that method will be as a user matter.
And after that here, I want to do want to create that relation.
So if you want to create a position is will be it was a one to one relation.
So I want to do this as a return and return and this return this and after that here I want to do want
to add that one to one relation.
Want one deletion means it will be as it has one.
OK, that means that will be has one, I name it as it has and then one friend and has one relation
I want to do that is there has one of the relation with our user, so that is our user model.
And here I want to do to add that class.
So that will be our class.
And after that, which filled with both two of these really want to create the relation.
I want to create the relation in our user terbil into the user terbil that is actually idea that this
idea will be matched with our these categories, this user ID.
Right.
So here you have to do we have to add both of this.
So you had that ID, so one will be as ID and here it will be, create the relation with another one
and that one will be as a user underscore I right.
Since I simply added both of these are they will feel as ID and the user ID and also I get all the data,
I get all the data and display that things in our with the controller.
Right.
So now open our controller.
So I have already created the controller as a category controller and the category controller here.
You can see that is our look into them and that is our Manadel one.
So that is our query builder.
Right.
So right now I want to do want to first of all, work with the we warrant Warren for the reasons here
in our database.
That means this model.
We need it.
So right now, I want to do I want to actually make it as a command out so that that is actually our
query Will.
Ah, so now I want to do want to point out this look into water, right?
So what is he looking at?
What am I positive about?
That is a category the CATAGORIES model also found with a category model.
That is the latest all the data.
And that is our basic mission, which I have already discussed about that things were different.
So right now I get all the data from all categories and here I take the things with this variable and
after that I compacted that mhere.
Here I pass the data index statistical base.
Right.
So that is our index.
Like if you go to that is our view under the category and the index is right.
So here I simply get all the data and visibility on here.
So now if you want to visibility so you can actually visibility with using that user.
So here I have created that method name, our method name as a user.
So now with this user, we can actually access out.
This is the field that this user user table feels.
So now I want to do I want to use that user.
So here we don't need this.
I want to do I want to use that user.
And with this user, I want to access our filename.
That means I want to do I want to display our TS name.
OK.
That means this name.
So now I want to do and that is our freedom.
Our freedom will be as a name, perfect.
So that's all you have to do.
Now let's check this out.
Now, if you click on the save all I can of to save all and now if you go to your side and now if you
refresh it.
Yes, you can see it now is perfectly updated.
So that is the all the user.
That means this Karzai is visible.
Right.
If you go to our user and the user here can see that is idea one is our Cozette, OK?
And I do it for the audience.
So if you go to our categories and here if you want to change it, like I change it and make this as
a two no click as they serve.
And now you can see there is already two to now.
It should be visible for our Mansi item.
That should be visible as a tool.
Right.
So now let's check this out if you notice, because that means there is a regular mouse fashion.
And now if you refresh, yes, you can see there is actually inside and some outside item is now become
changed and now it's become showing as a ardia hockey fan, I hope is very much clear to you.
If you go to that second base and the second page here, you can see everything is not perfectly displayed.
So here I can create one of the relation as a one to one relation with our catagories table to our user
table.
And here I must to have this field as the idea will be matched with our these categories table user
idea and we initially match.
I get this name.
OK, that means this table user table them.
So here, if you are working with this, you look into our end, then you can actually work with this.
We, we have then you have to work into the model area.
That means category model here.
I have created one of the method and then I return and this has one and I simply load it to have this
field.
OK, so that's how you can actually create that religion of this table and you can get this data.
And here I visibility with our user and then our film, I hope is very much clear to your friend Zino.
Next video.
I want to do the same thing, so I want to do the same things with using our query builder.
So here I have used that.
You look into Aughrim so we can do the same, that Misho can create that relationship.
We do have this table with using that CareerBuilder.
In our 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.