1
00:00:00,180 --> 00:00:01,800
Hello, friend, welcome back.

2
00:00:02,190 --> 00:00:07,610
In a previous video, we successfully complete our user comment options right now from here.

3
00:00:07,620 --> 00:00:13,230
If you want to put some of the comment to specific this blog post, then you can put that comment right

4
00:00:13,680 --> 00:00:18,900
now in this video I want to discuss about if you want to put some of the like and the INLIKE option

5
00:00:18,900 --> 00:00:20,730
for a specific this blog post.

6
00:00:20,730 --> 00:00:22,720
How can do that work in this video?

7
00:00:22,740 --> 00:00:27,630
I will show you that things with the live example for doing this I want to do I want to use one of the

8
00:00:27,630 --> 00:00:28,860
phone, some icons.

9
00:00:28,860 --> 00:00:34,170
If you want to use that font or some icon, then you have to have to add as a founder of some citizen

10
00:00:34,170 --> 00:00:39,230
rights, if you go to the Google and if you start with the font of some CDN by maxilla.

11
00:00:39,240 --> 00:00:41,430
And so I want to use that backslidden.

12
00:00:41,430 --> 00:00:47,340
And also, if you want to use that font or some bootstrap or the W3 schools, then you can use it right

13
00:00:47,340 --> 00:00:49,020
now for this cause.

14
00:00:49,020 --> 00:00:50,280
I want to use that font.

15
00:00:50,280 --> 00:00:50,880
Awesome.

16
00:00:50,880 --> 00:00:58,230
That Maxygen, if you go to our this our link in particular, that link area, you can see that is the

17
00:00:58,230 --> 00:00:58,650
link.

18
00:00:58,830 --> 00:01:00,690
OK, so now I don't actually use it.

19
00:01:00,700 --> 00:01:02,490
So if you want to use it, I copy it.

20
00:01:02,640 --> 00:01:04,650
So that is the font of some clear link.

21
00:01:04,650 --> 00:01:05,910
So I want to use this.

22
00:01:05,930 --> 00:01:07,530
So if you use that font awesome.

23
00:01:07,530 --> 00:01:13,380
This video link, then you can use any font or some icon in your site so that no one to turn to copy

24
00:01:13,380 --> 00:01:13,530
it.

25
00:01:13,530 --> 00:01:19,080
And now go to our I want to turn to add it in our template into the basics.

26
00:01:19,080 --> 00:01:24,330
HTML goes into the way the stimuli have already added our bootstrap CDN Sears's.

27
00:01:24,330 --> 00:01:24,560
Right.

28
00:01:24,840 --> 00:01:27,610
So in particular, that position I want to do want to use it.

29
00:01:27,930 --> 00:01:30,150
So first of all, I want to add that link.

30
00:01:30,630 --> 00:01:38,040
If you add that link as a link and it tells you that here in our Haiti video posted on the past, our

31
00:01:38,040 --> 00:01:39,140
founders Obsidian.

32
00:01:39,390 --> 00:01:40,790
So that is our Maximilien.

33
00:01:40,890 --> 00:01:41,260
Right.

34
00:01:41,490 --> 00:01:47,320
So first of all, make sure you add it so now you can access and we found the some icon in your project.

35
00:01:47,730 --> 00:01:52,380
So for the business right now, I'm just going to save all and now want to do all the visible, some

36
00:01:52,380 --> 00:01:53,880
of the font, some icon.

37
00:01:53,970 --> 00:01:57,210
And I want to use it in our digital space.

38
00:01:57,220 --> 00:01:58,700
That means in our blog.

39
00:01:58,710 --> 00:02:04,070
And if you go to that blog, blog details and here that is our comment option.

40
00:02:04,080 --> 00:02:05,180
So better.

41
00:02:05,190 --> 00:02:08,750
That is our blog details that there is our blog, Titos Dev.

42
00:02:09,180 --> 00:02:10,150
So after this.

43
00:02:10,170 --> 00:02:13,950
OK, so here after this, I don't actually use it.

44
00:02:14,460 --> 00:02:16,730
That means that will be visible.

45
00:02:16,860 --> 00:02:18,960
That will be visible after this hour.

46
00:02:18,960 --> 00:02:19,920
Contain after this.

47
00:02:20,160 --> 00:02:21,720
Now, the visible visibility on here.

48
00:02:22,080 --> 00:02:24,330
So better on the deck of the H.R..

49
00:02:24,360 --> 00:02:26,050
That means one of the H.R. hearings.

50
00:02:26,490 --> 00:02:29,530
And then I want to do want to use our font or something.

51
00:02:29,820 --> 00:02:36,150
So here I want to add all the riffling and the riffling area and put our phone to some links.

52
00:02:36,150 --> 00:02:40,830
If you already know about the Fondacaro, some if you go to that Fondo, some official site and they

53
00:02:40,830 --> 00:02:42,200
have so many icons.

54
00:02:42,480 --> 00:02:50,010
So if you want to use it, like I use as one of the font awesome icon link I put on the class, so I

55
00:02:50,010 --> 00:02:58,710
want to put on the class as a file and then FIFA, I want to use that Tumblr of Dyken tumbles and then

56
00:02:58,710 --> 00:03:06,260
the all OK, get balls or and then I want to do and that is actually one of the font, some of the icon

57
00:03:06,270 --> 00:03:08,540
class and I want to use that as an app.

58
00:03:08,580 --> 00:03:10,530
OK, I want to make that as an app.

59
00:03:10,890 --> 00:03:18,480
And also here I want to do better like here if you're not going to save all like first of all, I want

60
00:03:18,480 --> 00:03:19,140
to check it.

61
00:03:19,710 --> 00:03:22,870
That is appropriate or dispositional not click the refresh.

62
00:03:23,280 --> 00:03:23,610
Yes.

63
00:03:23,610 --> 00:03:25,800
You can see so perfectly and display.

64
00:03:25,810 --> 00:03:29,280
So that is our HHR and then our founders, some icon.

65
00:03:29,640 --> 00:03:33,630
So no one should be trying to make that a little bit, a little bit bigger size.

66
00:03:33,630 --> 00:03:37,890
So if you want to make is that means are far into the fire I want to make as a 2x.

67
00:03:37,900 --> 00:03:45,630
OK, it should be then a little bit big size click is a save all and now if you refresh it.

68
00:03:45,810 --> 00:03:46,190
Yeah.

69
00:03:46,230 --> 00:03:47,190
Because it's perfect.

70
00:03:47,460 --> 00:03:54,990
And also I want to use another for Tumblr for the down but here that is our one and I want to take another

71
00:03:54,990 --> 00:03:55,260
one.

72
00:03:55,980 --> 00:04:01,920
I take another one and that will be, that will be as far far not the app.

73
00:04:01,920 --> 00:04:03,540
I want to make that as a down.

74
00:04:04,650 --> 00:04:11,040
So, so I don't know if you click on the save all and now if you refresh it.

75
00:04:11,430 --> 00:04:11,760
Yeah.

76
00:04:11,790 --> 00:04:14,810
You can see that is our thumbs up and thumbs down.

77
00:04:15,150 --> 00:04:18,180
So here it not should be displayed like the toy here.

78
00:04:18,180 --> 00:04:24,230
I only want to do when this user will be like this because then it should be as a like then it automatically

79
00:04:24,240 --> 00:04:25,530
should be going down.

80
00:04:25,800 --> 00:04:30,570
That means that thumbs down and when you click select the thumbs down, then automatically it will be

81
00:04:30,570 --> 00:04:33,390
updated with our another icon at the thumbs up.

82
00:04:33,790 --> 00:04:38,240
If you want to do that work, we have to do we have to create some of the function for this.

83
00:04:38,610 --> 00:04:40,380
So right now, we don't need this.

84
00:04:40,380 --> 00:04:46,710
I want to do I want to put some of the function I am to put some the function in our view, that means

85
00:04:46,710 --> 00:04:49,020
in our blog and there is our view.

86
00:04:49,170 --> 00:04:55,170
OK, and also, you know, if we go to that old model into the model, I have already created one of

87
00:04:55,170 --> 00:04:57,440
the class that is all likes class.

88
00:04:57,450 --> 00:04:57,650
Right.

89
00:04:57,690 --> 00:04:59,640
So we dislike the design, as I told you.

90
00:04:59,980 --> 00:05:05,570
There is a blog I have already created that relation with the blog class and also the user class that

91
00:05:05,590 --> 00:05:08,750
benzoate user like which blog posts for the reasons here.

92
00:05:08,770 --> 00:05:15,190
I have already declared both of this and I want to do want to create that our function that you details

93
00:05:15,190 --> 00:05:21,770
that interview page and hear after this, after this and want to create you have to create actually

94
00:05:21,790 --> 00:05:25,390
two functional one is for the like, another is for the unlike.

95
00:05:25,390 --> 00:05:25,670
Right.

96
00:05:26,050 --> 00:05:30,250
So now, first of all, I want to create the function and name it as a function.

97
00:05:30,460 --> 00:05:32,500
And I just named that as a Leicht.

98
00:05:33,280 --> 00:05:35,640
OK, name it just like I needed to like the idea.

99
00:05:35,650 --> 00:05:37,540
We have to have to pass that request.

100
00:05:37,780 --> 00:05:44,080
And also here we have to pass on the idea because of all this blog post aspecific this blog post that

101
00:05:44,080 --> 00:05:45,130
helps out the idea.

102
00:05:45,250 --> 00:05:45,630
Right.

103
00:05:45,640 --> 00:05:52,270
If you go to our database into the database idea, if you go to our home, if you go to that blog and

104
00:05:52,270 --> 00:05:58,470
if you put your calls, ecosystems as a nine idee is not as a six idee, and that is a one 180.

105
00:05:58,810 --> 00:06:02,290
So here we have to find out a specific one of the ideas blog post.

106
00:06:02,300 --> 00:06:02,530
Right.

107
00:06:02,560 --> 00:06:06,340
So which blog post you actually putting that as a like or dislike?

108
00:06:06,730 --> 00:06:08,170
So someone for the results here?

109
00:06:08,170 --> 00:06:14,290
We have to do we have to also pass another parameter as if our ideas are right now and make it as a

110
00:06:14,290 --> 00:06:15,950
pick it up is the primary key.

111
00:06:16,000 --> 00:06:21,250
OK, primary kidi our database table as they have the following of the ID.

112
00:06:21,260 --> 00:06:24,200
So I on deposit with the piqué, that means the primary key.

113
00:06:24,610 --> 00:06:29,560
So now I want to do, I want to add our first of all I want to get all the data from our block.

114
00:06:29,950 --> 00:06:34,000
That means that is our I want to get that specific, this blog data.

115
00:06:34,000 --> 00:06:35,050
So we want to get it.

116
00:06:35,050 --> 00:06:42,340
I have already Lord if you go you can say I have already improved our block plus the common class and

117
00:06:42,340 --> 00:06:42,950
the like class.

118
00:06:43,000 --> 00:06:47,410
So now we can actually use it so on to do to use it on here.

119
00:06:47,740 --> 00:06:52,510
So will be first if I take one of the variable as a block and it'll be just like the same before.

120
00:06:52,510 --> 00:06:59,080
So that is our block class and from the block class I want to get all that our objects that the right

121
00:06:59,080 --> 00:07:02,650
objects and to get it and when and when they will begin.

122
00:07:02,690 --> 00:07:07,780
That means our database that have one of the field name as a primary key issue will be matched with

123
00:07:07,780 --> 00:07:09,640
our distinguished primary key.

124
00:07:09,700 --> 00:07:10,050
Right.

125
00:07:10,450 --> 00:07:14,740
So that will be our match with our distinguished primary key when it should be match.

126
00:07:14,860 --> 00:07:17,160
I also wanted one to get that our user.

127
00:07:17,500 --> 00:07:19,060
That means our current user.

128
00:07:19,060 --> 00:07:24,810
So for the reasons I take one of the variable as it user and I only want to get our current user.

129
00:07:24,820 --> 00:07:30,060
So if you want to get the current user, as I told you before, that will be as a request user that

130
00:07:30,250 --> 00:07:34,030
this which user is right now already logged in.

131
00:07:34,030 --> 00:07:40,510
So that is right now I'm logging with The Guardian and also I want to do like this one.

132
00:07:40,540 --> 00:07:41,440
This one I want to make.

133
00:07:41,440 --> 00:07:46,000
That means if you want to access our this method and then first of all, you have to do have to make

134
00:07:46,000 --> 00:07:48,530
that as a request, that means a logging request.

135
00:07:49,540 --> 00:07:54,490
So here I have already improved our logging request and I want to do and actually use it.

136
00:07:54,910 --> 00:07:57,790
That means I have already discussed about the things we do.

137
00:07:57,790 --> 00:07:59,380
I think you already know about it.

138
00:07:59,380 --> 00:08:01,520
There is another function as a logging vehicle.

139
00:08:01,630 --> 00:08:08,170
So right now, if you want to access our this logging, that means if you want to update any like or

140
00:08:08,170 --> 00:08:10,290
dislike, first of all, you have to logging.

141
00:08:10,300 --> 00:08:14,890
So without logging, we cannot afford that post as a like or dislike.

142
00:08:14,890 --> 00:08:15,190
Right.

143
00:08:15,490 --> 00:08:22,090
So I make that as a logging vehicle and then I get our current user, which user is already logging.

144
00:08:22,180 --> 00:08:24,200
And now I want to do I want to filter it.

145
00:08:24,200 --> 00:08:30,730
So if you want to filter it, I take one of the variable as it already already underscore anonymity.

146
00:08:30,730 --> 00:08:37,780
They already like like I already like one of the variable and now with our likes model, that means

147
00:08:38,410 --> 00:08:39,400
I name it.

148
00:08:39,520 --> 00:08:43,990
If you go to a model that is a like smart aleck that is like.

149
00:08:44,390 --> 00:08:47,710
So now with this like I want to do, I want to actually matched that.

150
00:08:47,860 --> 00:08:48,790
I want to filter it.

151
00:08:48,790 --> 00:08:55,870
So first of all, I want to get all that our object's data, all that our object's data and now want

152
00:08:55,870 --> 00:09:02,080
to filter filter means, as I told a friend, it would be actually such OK, it will be sorted.

153
00:09:02,360 --> 00:09:03,160
That means useful.

154
00:09:03,160 --> 00:09:08,680
Besides our which user actually like our Hewish block.

155
00:09:08,920 --> 00:09:09,280
Right.

156
00:09:09,280 --> 00:09:10,390
So, so besotted.

157
00:09:10,630 --> 00:09:17,320
So for the reasons I make it our objects and filter and with this filter I want to start out which block

158
00:09:17,320 --> 00:09:18,250
that is our block.

159
00:09:18,670 --> 00:09:20,950
Our block will be our block.

160
00:09:20,950 --> 00:09:23,230
That means here that is our block.

161
00:09:23,230 --> 00:09:28,030
Cell block will be our at this block I pass it.

162
00:09:28,270 --> 00:09:33,060
And also here we have to do we have to also add our user.

163
00:09:33,400 --> 00:09:35,110
That means there is also another user.

164
00:09:35,110 --> 00:09:37,810
I make our one of the four and use that user.

165
00:09:38,110 --> 00:09:39,060
So this user.

166
00:09:39,880 --> 00:09:42,400
So this user will be our current user.

167
00:09:42,400 --> 00:09:42,640
Right.

168
00:09:42,640 --> 00:09:46,240
So our current user, I have already get the data with this variable.

169
00:09:46,240 --> 00:09:47,830
So no, I just simply pass it.

170
00:09:48,340 --> 00:09:50,620
I hope it's very clear to your friend.

171
00:09:50,620 --> 00:09:56,070
So that block actually our D block in our model is the model that is our block.

172
00:09:56,350 --> 00:09:59,290
So with this block we get our all the data.

173
00:09:59,580 --> 00:10:05,550
No specific idea that I get it and then I take it with this variable, right, so now it's still match

174
00:10:05,550 --> 00:10:11,400
and also our user, that means our model and the model that is our user.

175
00:10:11,400 --> 00:10:12,210
Which user?

176
00:10:12,220 --> 00:10:14,420
That will be our requested user.

177
00:10:14,430 --> 00:10:15,640
That is the logging user.

178
00:10:15,660 --> 00:10:21,570
So this current user, I take it with this variable and we also match, I hope it's very much clear

179
00:10:21,570 --> 00:10:21,980
to you.

180
00:10:22,170 --> 00:10:28,620
And after that, I want to do a report on the condition that if this already not like, OK, that means

181
00:10:28,620 --> 00:10:33,990
if this user already not like this post, then what exactly is shall we do so here?

182
00:10:33,990 --> 00:10:36,720
I make that things with our if condition.

183
00:10:36,730 --> 00:10:39,060
If not, I take it.

184
00:10:39,060 --> 00:10:46,440
And that means our blog and the user, I take it with this variable, if it's already not like then

185
00:10:46,440 --> 00:10:47,690
what exactly should we do?

186
00:10:47,940 --> 00:10:52,800
So then it should be updated that our post again that means the Leicht.

187
00:10:54,070 --> 00:11:00,840
I take another variable as a like underscore post or whatever he wants to make that it's totally up

188
00:11:00,840 --> 00:11:01,230
to you.

189
00:11:01,230 --> 00:11:07,080
I take one of the variable of the like post and with this like boils down to do with all like that is

190
00:11:07,080 --> 00:11:13,380
with the like plus I want to do and to make our sem I should be also check it with our blog will be

191
00:11:13,380 --> 00:11:17,760
as a blog and our user will be our user.

192
00:11:17,910 --> 00:11:18,290
Right.

193
00:11:18,300 --> 00:11:22,710
So I make that things on here and after that I don't want to save all this data.

194
00:11:22,720 --> 00:11:30,030
That means our dislike pulls data, this variable data and to save it I simply save it on here.

195
00:11:30,270 --> 00:11:35,040
And when we say where exactly to be like that, it will be redirected to our SEM.

196
00:11:35,700 --> 00:11:39,690
I shall be redirected to our same base.

197
00:11:39,690 --> 00:11:41,910
That means here I have declared the same thing.

198
00:11:41,910 --> 00:11:46,230
So you can see it should be addicted to our blog and then blog details space.

199
00:11:46,620 --> 00:11:48,840
That means it should be rejected.

200
00:11:48,870 --> 00:11:52,170
Like if you put any comments on after that comments, what exactly.

201
00:11:52,530 --> 00:11:58,020
If you can get a comment and then you can see it's still redacted to our same page, that blog Little

202
00:11:58,020 --> 00:11:59,970
Space and then the resource slack.

203
00:11:59,980 --> 00:12:00,380
Right.

204
00:12:00,390 --> 00:12:06,440
So here we did that work before for the comments of the comments when it should be done, that pissoir

205
00:12:06,450 --> 00:12:12,480
should be saved, then it should be rejected to our written and then EDP response to that and the reverse.

206
00:12:12,480 --> 00:12:14,760
It should be redacted to our blog details page.

207
00:12:14,760 --> 00:12:21,480
And also at the have of the key argument, that means that these our blog details space.

208
00:12:21,480 --> 00:12:24,410
And they have also the key argument as it's like.

209
00:12:24,420 --> 00:12:24,920
Right.

210
00:12:24,930 --> 00:12:27,590
So you can see there is a CLARKIE argument as Aslak.

211
00:12:27,970 --> 00:12:29,900
So you should be just like that then.

212
00:12:29,940 --> 00:12:31,660
You should be just like the better.

213
00:12:31,750 --> 00:12:32,610
I copy it.

214
00:12:33,150 --> 00:12:38,200
That means here here will be our direct to our particular database.

215
00:12:38,220 --> 00:12:41,880
OK, and that between I like will be saved then it should be returned.

216
00:12:41,880 --> 00:12:48,630
Our EDP response sedrick and then the reverse is redacted to our blog details with our key argument.

217
00:12:48,630 --> 00:12:52,800
I pass our select software that I hope is very much clear to you.

218
00:12:52,920 --> 00:12:59,170
So if you want to like it automatically to to our blog title space we dislike right.

219
00:12:59,190 --> 00:13:01,200
For the reasons here, we have to also pass it.

220
00:13:01,380 --> 00:13:06,540
So now I want to do and to create another function for the unlike like so now I take another one and

221
00:13:06,540 --> 00:13:07,130
then name it.

222
00:13:07,350 --> 00:13:15,330
I'm unlike OK, it will be as unlike and also it shall be as a logging record, I name it as a logging

223
00:13:15,330 --> 00:13:19,650
vehicle and that will be as unlike also here we have to pass that request.

224
00:13:19,950 --> 00:13:21,390
It'll be the same concept.

225
00:13:21,390 --> 00:13:25,010
Also here we have to pass on the idea that that means a blockbuster idea.

226
00:13:25,410 --> 00:13:28,080
So first of all, I want to do want to add some things.

227
00:13:28,180 --> 00:13:32,520
They I want the variable as a blog and from our block class model.

228
00:13:32,520 --> 00:13:38,830
I don't want to get all the other objects that are all that are objects that I want to get it from here.

229
00:13:38,850 --> 00:13:41,690
Should we check our database idea with the Matute?

230
00:13:41,700 --> 00:13:44,730
We will be matched with our these requested ID.

231
00:13:45,270 --> 00:13:47,520
I name it as a picture to look at.

232
00:13:47,520 --> 00:13:50,750
That is our primary key and also we have to get our user.

233
00:13:50,760 --> 00:13:53,880
That means our current user, current user in our request.

234
00:13:54,030 --> 00:13:56,670
That means our biggest user will be our current user.

235
00:13:56,850 --> 00:13:59,670
Redfearn, I hope, is very much clear to you.

236
00:13:59,670 --> 00:14:06,900
And after that I take them as they are already like already like this step up one of the variable and

237
00:14:06,900 --> 00:14:10,890
now with our likes model, that means with our lives model.

238
00:14:10,890 --> 00:14:14,310
I want to do want to get object here.

239
00:14:14,310 --> 00:14:15,810
Also we have to filter it.

240
00:14:16,380 --> 00:14:20,070
So I want to do in the filter and filter it with our SIM.

241
00:14:20,070 --> 00:14:28,350
That means this user with block after block will be the same as a block and also our user will be our

242
00:14:28,350 --> 00:14:29,190
current user.

243
00:14:29,520 --> 00:14:34,770
Right now I think that our current user with this variable life simply pass it perfect.

244
00:14:34,770 --> 00:14:38,280
But here it will be a little bit different before I save this data.

245
00:14:38,280 --> 00:14:40,920
That means here I save our life post data.

246
00:14:41,160 --> 00:14:47,640
So right now I want to do in this user will be I like it automatically or previous one that is our previous

247
00:14:47,640 --> 00:14:48,970
record will be deleted.

248
00:14:48,990 --> 00:14:54,960
OK, so here I want to do and to make that hour and it doesn't matter as a direct that means we are

249
00:14:54,960 --> 00:14:58,620
already with our already liked here.

250
00:14:58,620 --> 00:14:59,420
I want to do under the.

251
00:14:59,490 --> 00:15:03,120
Like, did I call or delete my thoughts, that will be as a direct.

252
00:15:03,220 --> 00:15:09,210
OK, so this will be deleted from here and after that, which will be redacted to our SIM, I shall

253
00:15:09,210 --> 00:15:10,800
be rejected or same pace.

254
00:15:10,830 --> 00:15:13,560
That means that we Tandi direct, but I copy it.

255
00:15:13,740 --> 00:15:18,420
And now after that, after that, it'll be definitely direct to our same page.

256
00:15:18,450 --> 00:15:24,210
That means one or two bits out, like there needs to be direct to our SIM as a blog detail space with

257
00:15:24,210 --> 00:15:26,100
all of the key argument I just like.

258
00:15:26,250 --> 00:15:26,620
Right.

259
00:15:27,000 --> 00:15:28,450
So now it's perfect.

260
00:15:28,560 --> 00:15:30,900
So now we have to do we have to create a tool.

261
00:15:30,980 --> 00:15:33,120
This is all we have to create.

262
00:15:33,120 --> 00:15:38,070
12 this year, all for one of the four our like, and that is for our unlike some better friend.

263
00:15:38,070 --> 00:15:39,630
I want to continue this process.

264
00:15:39,630 --> 00:15:42,790
You know, next video, I will show that things with the live example.

265
00:15:43,230 --> 00:15:44,780
So thanks for watching.

266
00:15:44,790 --> 00:15:46,650
I will see you the next video.
