Hello, friend, welcome back.
In a previous video, we have created two of dysfunction, one is for our like others for our INLIKE.
Right.
So now I want to do I want to create some of the what that means in our blog into the blog.
That is what you are seeing today.
You are an area.
I want to create two of this.
You are all better here, but I just copy it, OK?
I copied and pasted so and also we need the two I want will be a name of the pop as a name, as a like
OK, you should be as a light.
And also after that like here I have passed one of the other parameter as a speaker.
That is our primary key.
Right.
So here also you have to do have to pass it.
So now I want to do undeposited, our primary key.
OK, so make sure you added and then our into the View area.
I have created one of the function, our function name as a like I name it as a like.
And also it should be as a like underscore post, OK, I name it as a like post and also I want to do
another take another one.
Sorry, it will be actually here that was like and I name it as like post and also also be as in our
picture.
I copy it and it will be as a picture.
So that will be our like adding to the view area.
I have created that like one of the function and then I name it as like post.
And also I have to do the another one for the unlike.
So it will be as unlike OK to be as unliked.
And then also from here we have to pass the picture.
That means the primary key.
If you go to a view that is our I like here, I have also passed that our primary care is a picture.
Right.
So it will be in our view, I have created on a function as I like see to the view.
I have created that function name as unlike.
Right.
So now it shall be as I liked.
You should be the unliked post.
OK, that will be our this Puttnam.
So here, as I told you friend here, it should be visible only one.
That means one you should be as alike then it should be as a down.
That means thumbs down one or should better thumbs down.
Then until we have the thumbs up here we have to do we have to also update our blog details.
That means I have already created one of the function, in our view into The View here.
That is our blog details.
Right.
So you do the blog, the area.
We have to pass that information that the user is already lt is true or false.
Right.
So here also you have to pass it so better.
That is our common form.
And after that coming from look after that going from I take another variable, I name it as it already
liked and then we are like sorry, with the likes model and we just like model.
I want to get all that our life's object and object on the filtrate.
So I want to filter so that just like same you should be.
Check out our blog.
Our blog.
Is that appropriate.
Same block or not.
Or not.
And also so we check our users to our round.
This user will be our current users.
So for the current user, I have already declared that part.
The current user will be our requested user.
Right?
So we will be as a request and then our request user perfect and no one to do and to put on the condition
if if our D already left is already like this, already like is true, OK, that means if this is like
a name, one of the variable as I liked and here I make that as a true OK, I make that as a true and
else.
And also after that, after that I make that as this condition area as ls ls is to be able to.
So we make our disliked.
That means this like I want to make as a false.
So for the reasons here, it should be now displayed only one icon so no one to do and actually pass
it.
I want to pass out this like so here from to this position on the seat, you know, our block details.
That means that is our block details that as HTML Suheir here, I want to pass it after that.
Confirm that is a comment option.
And after that I want to go and also pass out like I simply pass it now we can actually use get that
information.
This is true or false that we like is true or false.
So now with this we can access our dislike in our blog, details that piece in a blog, Little Space.
For now, go to our blog details and read the blog details here.
I have already added to this icon.
One is the word Tombak on another.
It does come down.
So I want to do want to put one of the conditions.
So in particular that area on to put on the if condition, if and if not our I from here I pass our
both of these I paths that our liked rights even.
These I show you that everything will be more clear to you, if not light, then it shall be display
our this part, OK, that means you should be able display this part and else.
And I want to do want to add another ls ls is Silvy display are this part.
And after that also we have to do we have to finish it.
That means we have to finish our and the condition.
Right.
So no one to interpret our you.
That means here have already created two of the seawall.
So now I want to update it.
So that will be our water and that you are an area so that you are area I want to do if we go to our
URL.
So we with our blog.
So we our block.
So with this I blog, I want to do on Texas our like post.
That means this user is already liked it.
So that is all like post I copied and here I passed it.
OK, sorry.
Here after this here we have to do have to post it so that it will be our equal.
And also you can see into the are area and they have also not the picture.
That means that one of the ideas also you have to do we have to declare it.
That means aspecific our block idee.
So now after that, I want to turn to our variable as a picture and now for this block.
So for this block, I get all the data you can I get all the data with this block because of all.
If you go to our view, also in our blog details here, I pass all the tower, block that out with this
block right into the dictionary.
I have it.
So now with this block, we have to display it.
That means here there are pictures.
So if you want to access our database, fill it.
That means our primary case with this block to do and to access our primary key.
OK, friend, I hope is very much clear to you.
So that is our picture because of if you go to our you are I have already declared on the picture the
primary key.
So right now I take it with the same name.
And then with this block, I want to access our block table, one of the default feel as if I feel that
means our primary key.
So now I want to access it and also to do the same thing.
So better I copy down to do the same things for our down for the down.
I want to want to use our another liberal in with our blog, a blog entry to access our this one.
That means that unlike post so that will be our like post and that will be our unlike post and then
our idea will be the same RPK and with this block and access our pick it up in the primary key.
Perfect.
Now let's check this out.
If you click on the save all that stuff along to check our server.
Yeah, you can see our server is not totally running, so now I want to check it like here, not only
if you click refresh.
Yes, now is different now it's actually showing one and now that is I'm not like it.
So that means this post I want to like like if you want to like it, because a click and now here showing
Arrow, that is the name or names like is not defined.
OK.
So here is the return.
There is a blog.
I found that our flag.
Uh, now, if you go to again, that is our view into the view space, so the view area, I have passed
our blog details and the is key and there will be others like my friend here.
One thinks you can see I declared our light with our one of the perimeter as a picture.
Right.
That means that is actually our piqué.
Primerica will be Matute out.
This requested by Maliki and we decided block I take that things from all that object and I take the
things with this blog.
Right.
So this will be our ID.
We decide do we have to declare our slack.
That means here you have to do have to pass that block with this block you have to do we have to declare
that our flag right.
Because of for this block that have some the specific ID and we decided to get all that our block object
data.
So for the reasons here, we have to do, we have to pass it.
So that is actually the hour, hour or so.
Also here we have to do the same.
We have to pass our blocks with this block.
We have to pass our dislike.
Right.
So now let's check this out.
Now, if you click the save all on the check it again, everything's running well now if you refresh
it.
Yes, you can see it's not perfectly updated.
And here friend is also updated our down right now.
Before that was actually thumbs up and now this is still showing as it comes down.
So, friend, I hope you can understand that concept because of all that.
I have also the idea and this idea get all that block object that I take.
The things with this variable, the now into the slag area, I pass it, I pass out this block idea
also.
OK, so now it's not perfectly working.
So now if you want to like it, then automatically it'll be updated as a inlike and if you want to unlock
it then our previous data will be elected and then you can see back become as a like option.
So right now from here you can like this post, you can like this post or you can like this post, OK?
And if you go to a home, if you go over this and then of course also every four hour, every block
post, that is actually dynamic.
So now for our every post we can use it if you want to like it is be like if you want to like it then
or something like perfect.
And also here, if you want to view the count, that means how many people like this post and how many.
Also here I read the comments, how many people actually put that comment with specific to a specific
D blog post.
If you want to disable discount, you can visibly, very easily.
So right now I don't the visibility in our little space now go to our details that with our blog details
and at the blog details after this.
OK, after this, I want to do and displayed so here and take one of the stack and there six here do
and the visible and the visible lead with our that is our blog details.
I have already passed all that information from our view, from the view I have posted as a blog.
Right.
So now with this blog, we can actually access it.
So now with this blog, I want to access our relationship.
That means if you go to our model into the model area for the like for the like, I have already declared
it because I have already declared as a blog that means the like blog distillation name.
So with this blog, I have already created that relation with our Franchi, with this foreign relation,
with the blog.
Right.
With our blog.
Plus now we can actually access it with our deselected name.
So now with this, I want to count how many people actually like this post that this blog post.
So now with this blog and access are like blog and then I want to do and access our account.
So to be as a account and then it be as a like, OK, we display the like and also better and put on
the pipeline and also and want to show our same as a comment.
So with this blog I want to access for our comment.
I have already declared another religion.
You can see I have already cleared the relation it shall be as a blog comment.
So I have already created that election in our comment class with our blog.
So now we can actually use our deselected them for the results.
Actually, I have created this related name.
I copy it and now go to our blog and here with this blog on Texas, our blog comment, and then I want
to learn to show that count.
So shall we show that count?
OK, it shall be as a comment.
Shall we display our common count?
Now, let's check this out.
If you look at the Savol.
I want to update it because I say, well, first of all, I to check it better.
And to check it, everything is running well and now to do and to update it, please refresh.
Yes, you can see friend is now showing us a zero likes and the two comments, that means I can see
for these blog posts that have the two comments.
And now if you want to like you can see the suffering of the two comments and also for the likes.
I like them.
I like it.
Yes, you can see suffering as a one likes perfectly.
And if you dislike it, it's becoming a zero.
That means is totally not dynamic.
And also going to update that comment like here, I put another comment because there's some meat.
Yes.
You can see it automatically updated as the three comment is visible under the zero legs.
I want to do and make that as a like a game is one like I hope you can well understand about it.
So for our every post they have that zero like there are two comments you can see for this post that
the two comment, if you like it, then it should be displayed.
The one like if you go to our home.
So that is our home.
Right.
And here, friend, like if you also want to visibly, that means you from the visible lower at this
portion as a one like.
And how many like actually polled for this blog post and how many comment for this post you the visible
lead.
So that is our block list based.
Right.
I want to do want to actually add it.
That is better able to copy it and copy total things from here.
And now go to our blog details.
That is a blog at list in the blog space.
So that is our blog list after this post by OK, after this post by on the Visible.
So that is our blog.
Publish the result blog author and after this to do and visible it, I just simply passed it now should
be visible the same as account for the how many people like this blog post and also how many people
comment this blog post.
No if you click as I save all and now if you refresh it.
Yes.
You can see the perfectly updated.
There is a one like that.
The three comment.
There is a one like a the to comment and there is a zero and a zero comment I hope friend you enjoyed
very much on next video Underdo if you want to from here you can insert the data.
Right.
So now if you want to update that, that means if only did this blog post, how can do that work?
In our next video, I will show that things with the living sample.
So thanks for watching and I will see you in the next video.