April 3, 2020
#23 Update Message Status | Laravel inbox functionality | E-Commerce Website in Laravel 5.5

#23 Update Message Status | Laravel inbox functionality | E-Commerce Website in Laravel 5.5

okay let’s move in this part we will try
to update status by clicking on any message
so now you can see a year with total six message for is under read that means for
message have a status month we will try to update status okay we will use Ajax
so let’s create a ID on click let’s say you have a ID here you any message okay
and here you will start script on script close here we will say document document
dot ready function and function start here you will put simply alert to test me Lord and you have added JavaScript
here you will add your message click so if I say message dot click function we
will define as a ID so don’t worry here I just will say a lot click reload if I
click and is quick note I think second one because we have to define an IDs so
for IDs first of all you will make here look for it loops in which will be fine
where s message and close your eye and your foliage put here message-id
if my sis ID click then we will say click ok so same ID we need here so we
will say message ID this is simple JavaScript I think you know about this
now every click is working ok that’s it hmm we need to put some type X course we
have to get value from our rope that’s why we have to put here we will say I B
so you will say message ID so I will say m ID m ID put message ID to find it ok
here you will get value 12 m ID and to your ID is same m ID not value dr. Lu
function will get text box like here you will say m ID let me test it this time
define that means some ok yes you need a hash click ok we have to put here
message ib also that’s why is working this is 4 this is
1 this is 2 ok everything is working now
just hidden this textbooks okay make it vida yes now no one can see this
we don’t need actually ID a lot we just maintain scalex and fast your data here
first of all time I will be I use yet you can use forced answer but I will be
se I be excused ID your m ID and here you
will say URL hmm URL I put any new route update update green box we will create
it so not very and after this success message it function response install all
dot low response that’s it now it will be zero for error because we don’t have
a route so I will create inside the middleware here update stick in box okay
in box out get it in the box and my account we not I think I need here let me try with only
function and equal something done reload open console reload again okay
remove this I think we have a error here we load again
inspector token okay is to time only one time you load again the error it’s clear
console click here is done response bro your second piece so let me create a new controller for profile okay you can
create a invokes controller also I think a profile controller this okay
left XP dos my folder named Lara show point 1 5 here is PHP our pizza make
controller troller name is that’s it file controller is created and HTTP
controller here is 4 5 controller we will choose here here’s profile controller added it up
put it in a box that’s it great new function inside your profile controlled
properly function update inbox here is after college request request variable here you will quench that’s close this
reload Akane’s open console now we must see the array
and here is the array message ID so messy the ID will receive now we will update our status so here is message ID
we will copy this and here request here you will update command update inbox or
you can say only update DB table inbox your table okay before this
will there be be ok and in box we have ID equal to this matches ID and you will
say update properties will be array so here you will put beta equal to zero
acid now if this query done and we response
it does operate successfully now reload message will display on console so let
me clear this console now touch any unread message ok status update
successfully now let me reload to see the difference now three message is read
now make call reload again we will make it reload by default by Ajax
automatically in later but now you can see our read and read its functionality
is complete and database is updated by a X ok
if you I may have a nice reaction please comment below if you liked this video
please click on like button hit the like button thank you see in the next video

3 thoughts on “#23 Update Message Status | Laravel inbox functionality | E-Commerce Website in Laravel 5.5

  1. Hi i just saw a vidoe of yours on react navigation, I have a question. I made a component <Headericons/> which is a view with 3 icons.This <Headericons/> component I put it in the Stacknavigator because react-native only lets me put one icon in the headerRight prop. However when i want to do a onPress this.props.navigate.navigation for the <Headericons/>(lets say a shoppingcart icon that brings me to shoppingcart page) it does not work i get an error saying undefined is not an object. How can i solve this?

  2. Hello guys !!
    I'm coding follow your video but I'm get result not same you , it not change color. what i'm wrong ? and this my problem : jquery.min.js:2 GET http://localhost:8000/updateInbox 500 (Internal Server Error)
    send @ jquery.min.js:2
    ajax @ jquery.min.js:2
    (anonymous) @ inbox:32
    dispatch @ jquery.min.js:2
    y.handle @ jquery.min.js:2
    thank for reply me.

Leave a Reply

Your email address will not be published. Required fields are marked *