Hello Friends welcome back to BitFumes I am your host Sarthak and you can also call me Ankur .
This is a channel where I talk about Laravel and the cool thing about Laravel So
if you are new to this term don't forget to subscribe that's the important thing
- first of all very happy Holi to everyone and especially the Indian
subscribers so the second thing is I want to thank you rather Buddha's for
donating an amount on people that meet flash between this show your love and
support was the victim and it encouraged me to create more and more professional
videos for you to help you and an analysis for any amount but if you want
donate please go to the link and provided in the description so in this
episode what we are going to do is obviously we are on the authentication
series and the next step will be the e-mail verification of the user but
before that I want to show you how to login with status that means if a status
of a user is not active then it will not able to login if the status is yes this
sticker is 1 then it can log-in Britain where so let's login with our original
system so I will go this login button now here I will type my email ID and
let's see errors because password is incorrect 1 111 enter oh yes we are
locked in shuttle fully so let's see the database we will go to the server now we
are on our server and let's go to the users table and here is the users table
and you can see there is no 6th column - lets go to structure and create that
column so that we can easily manipulate the user login so I will add after let's
say after lockni who go here I will type status and state absolutely of boolean
thing because we want gets 0 all the one okay so let's save it and
now you can see the user is not active members because it status is zero so
then we try to login now because we does not have provided any system for
preventing the logins with status so off when I go here and I am trying to login
I will easily logged in so you can see we are you logged in but for this
changes we will go to the sublime text and we are on our art folder where we
are working on authentication series so let's go to the app folder the HTTP
folder controller and the Earth folder you can see there is a login controller
go to this login controller okay and you can see it's using a authenticate users
file so let's go to that file inside the vendor level framework to eliminate
foundation or authenticate users so if you are using sublime it will be easy to
let click here and now go to the bottom and you will find a function called
credential let's just copy this function and now now paste this function inside
your login controller that means we are actually overriding this function so
what I am going to do I am just going to comment out this line okay and now I am
returning an array which says email will be obviously we want the email to the
same as this okay and the password will be the requested password that means the
first will given by the user good okay next thing is I want to give a
status of value one okay so now let's see what happened obviously there is an
error I will show that error after this thing
so let's go to the room and try to log in again let's log out try to log in
let's see what happened 1 1 1 1 1 1 and you can see there is an error because we
have not imported that request let's go here
the authenticate usual copy this and use that request here ok save this go to
room click refresh and ok we can see there is an error 1 1 1 1 1 1 so you can
see we are actually giving a status of 1 but we have the status of 0 here so
let's go and change it to 1 that means we are still having some error but if we
try to login let's see 4 the result is 1 1 1 1 so obviously we are not able to
login why because there is a change in our system whereas we have created we
actually have to create this we actually have to say request then arrow and
obviously we have to wrap this inside a curly braces now when I go here and type
1 1 1 1 1 1 the password hit enter and now you can see we are successfully
logged in so let's try to login again login again 1 111 and we are logged in
now let's try to change the status to 0 that means not active person now when I
go here the login system try to login 1 1 1 1 1 1 hit enter and you can see
there is an error credential does not match our record that means we have to
fully created the system where user have to verify it status that means with if
the user is not an active person it will not able to
Inc this is very much beneficial in our next system when we are trying to verify
the user by its email by sending an email okay so before sending emails we
will set the status to zero and then the user verifies its email then we will
change the status to one so if you have any doubts please feel free to comment
and if you have any doubt in any of our video and anywhere in your project
please feel free to comment and feel free to message me on Facebook I am
always ready to respond you and thank you very cuz we have successfully
reached more than 650 subscriber marks here on YouTube so thank you everyone
they share this video with your deliver friends follow me on Facebook Twitter
and Instagram and we'll meet in the next row suit till then VIP goodbye