Hi everyone.
In this video we will create another survey for Mark asked three okay, we will set the is read property
from phones to truth.
Okay, let me remove the update and remove over here.
We don't need that.
And with the file one we also don't need that okay.
Let me remove the file one also.
And mark what we need to do in here.
We need to go to notification I need to speak.
Right.
And the second one.
Uh I think we only need the notification ID.
And right now let me find the notification.
Attention.
Okay, so for that reason we actually need the file.
File on our method.
Okay.
We will delegate that job.
Actually right here we just need to call the ID because this is inside the notification service.
I will do job.
Okay.
And return notification.
So here we just need to call notification equal.
Why not file one and boost the idea over here.
After that, we just need to call the notification.
Dot is retrograde to be true.
Okay, that will be enough.
Make sure you await us.
And right here we need to real time also.
That is right.
So let's test that.
Raja is ready.
We will call.
As read property ID.
Okay.
And right here I will select read.
Over here.
Plus the dash I will duplicate.
Back as read and change method to batch.
And we already signed in.
Right.
What we do know is I notification I will copy that and put that over here.
Let's say okay not bad or sorry.
We should select read over here and say.
Send a message over here and let me get my notification again.
Now you can see the property will be become true.
Okay.
And one more method will be Mark on will be read.
So how to do that?
Well, in order to do that, we just need to create one more method.
Mark on read.
Okay.
And we should mark the current user.
Right.
And right here.
We need to.
Know why this dot.
Model dot five.
No.
We can use the update money.
Okay.
We can add we can boost the filter right here.
The receiver will recover the user ID.
Okay.
And the second parameter will be update field.
We want to update the.
Risk.
Ratio.
Right.
And make sure a new table with new control.
Okay.
Let us actually add in insert update money.
We don't have any new property okay.
So right now, with all that money, we need to fight the notification based on the current users.
And right here for sure we can put is moving forward.
Okay.
We will find beyond the current user and only the is read will be false.
We will update us.
So back to the controller and right here I will call read on.
My ugly mug on.
The current user.
Let me duplicate.
Hold on.
Mars.
And right here.
We don't need any idea over here.
We just need to read on like this.
And we should log in.
Okay.
And before that, let me go to the notification and I will change from true to false for that box.
Right here I will change to false.
We have phones and phones over here.
Let's test it.
One or not let me Using the method will be a success.
And if we check the database.
Now you can see it already updated show.
And here we will show also.
So very good.
Right between windscreen we already marked.
Everything will be great.
And oh sorry.
Actually this is not a real time okay.
Because this is only a fact in my room, right?
It will only affect with in the current method the current estimate request.
So we don't need to any real time for this thing okay.
We just need to real time for create method.
Right.
So that's for the video I will see you in the next one.