#10- Forgot Password Email with Reset Link in Laravel 10 | School Management System | PHP Laravel 10

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
Hello friends welcome back to school management system in Lara in this video I will explain how to make a forehead password so I already opened the websites so you can see it so we can make a year link for the password okay so I'll go to layouts I go to Earth inside login s for the password let's go to routes inside web site password controller controllers okay I'm using shortcut otherwise you can see controller inside auth controller okay I copying for what else spot inside forgot wave dot PHP just copy login screen appears go to websites click the English password so you can see it's worth very much let's change the titles and close the files open again so it's highlighting everything's okay I just put here for the passwords we don't need a like a password so you can bring a password also you don't need a reminder so you can also remove the reminders I'm going to redirect same URL into doing this anger and just type like this okay okay and CRF token already there is testing it to remove this link to login foreign [Music] everything [Music] so go to work controller create a new function switch velocity let's change all the liquid what I received okay refresh like this email.com whatever we have added so we can chat here this is already available in database cannot available inside database so just Wing to declare first our cable app engine so we can declare here our models model inside there our template so F first so I'll go to inserts model set is copy this works also I put here okay let's go here and we can create a one function check in get email functions I can pass here email address and inside I will create a get email yeah not get emails controller email you can type returns self yeah email is equal to email it and first we need to be single records self means we can using this class at user class suppose you can type like this user so is work otherwise you can type itself so also work so let's type a user user is so easily understand what we do self is like the is class okay so let's make here control DD and it means we need to print the our data in core PSP also you can use air printer so you can see data founds via submit so you can see your data forms support data found so when to send mail so go data not found so we don't need to send mail we need to send the one message that are not found means the email not found for this system to eat is not empty let's make this area users variable user is not the ace dollar user is not empty so going inside as it was going to outside so we need to make one error mattress return data there with ads with errors we can tap your message email not found in the individual support email found so we need to send email to his inbox so first of all we need to set up mail trivia because we are sending the email inside vehicle okay so open your mail trip account I will open my email address one so do you ever know any account so you can create a mailcraft account dot either so I can show you how to send it I load my accounts already I log in my accounts with the dummy accounts so that's great for testing I remove the all the messages here so I've been showing the clearing your things so you can go to laravels here laravels you can search whatever I will search so just copy this lines and put your ene files some lines let me close my steps so don't disturb me okay SMTP sandbox post there what also there is the name of the password also there so end filter so we just need to remove these ones yes happening we can type opening our school name and here we can type send the name we can type like admin at the redschool.com okay name from address from address so we already set up in our SMTP configuration now we can create the one made function so we're sending the mail to his account like admin account so open your terminal I already opened my terminal so you can type like command PS4 to some maker mail order password me you can press enter ing sometimes just wait few minutes it's few seconds minutes password so we can go to our codes we can check you can see its app inside the mail main Set photo password so you can see all the functions there here this is the different different involves content attachment because this is lateral 10 suppose you can using like another one so showing it differently here okay we have to use let's put level line and put here make your declaration I'm going to send email for this user so just type here to yes sorry which is using the main function email so we also need to declare this mail use two means who is the receiver so we can be using the receiver like that emails and send new project password Nails inside using type like and here we can create a one token zoom into send is token inside image so you can make a reset link but there otherwise we can create a like a password to me password you received your password is what we can do is a reset link now so it's good okay so first of all we need to create one token remember token two users remember we can using this column I go to database inside open the users tables you can copy this link propane means this name OTF within creator12 HDR HDM random if there is a wonderful function in large in build so you can use the HDR function so you still create the one token so we can declare about here Str after I've been feeling the same which click on Save and after I can put here user and you can type money message here image activation Place changer [Music] in so we can type like a message please hit your email and reset your password and this means we can put here data okay so whatever we have passed click users will pass so we can do here the one variable you can create public the teachers for the variables inside we can back to our taste user name this means this variable and you can pass here the user variables now we can set up the our email files so this is the you can type in here the subject so let's make a subject that forget passwords and we can type our content data so let's make a laravels we have set in a check how it's do I already opened all the websites yes inside email you can see 10 point versions I'll go up this lens and put ears and just change the file name file name like image image inside like we can do this photo we'll create a new folders emails foreign let me copy some code and we can put here for the password so I have only coffee if I am copying the file to here hello here's the username like a database name admin teachers who is a project businessman we understand this webcam okay here we have created one button like you are admin reset because I I will create a one root so I tested using the and just resets user remember to open means we have already created here remember to open in okay now let's close the surface we don't need other files so don't confuse and also in case you issue recurring password please contact us because this is the best link so anybody can contact your directly we can create like this which is about contact us later so right now I will explain for the password so we only pass here data users foreign the unexpected to when something error there so you can see because we are not at a simultaneous so that's an addition equals efficient base after you can type admin Elementary result.com registered so again showing like a developed Facebook development is users relative educate and check again guys the taking time so finally we received the emails in mail trips because we already confident milk 500 server there are I already see the email except when we understand in case I think I think what's the error I don't understand let me try again try again [Music] you can see it so let me click here reset your password so you can see we have passed this token here there this way this link is so let's create a one reset password hello routes so go to webs ite here and also we are passing the program so I'll pass like extra parameter here to open create a one function resets in the earth controller token so let's change this token and let me check is the get method proposed method so we can make a get method let's face this space so you can see we already get this token so let's verify this token is the correct not correct in our database so we can make another query here let's copy this line we can type here that check token get token value that open single ton okay let's make the main problem remember to open so you can't find the issue in Spanish go to users so go to apps models inside users put here for playable lines right here check change and we can make conditions if it is not empty it's going to insert else part able four zero four suppose we have found the data so we can create another files like the reset file reset reset instead we can pass it using data let me create this file inside auth resources use foreign passwords okay passwords password let me change every place passwords name is into the password here at tab C passing data let me replace the page now so you can see is the open reset password also you can see like the password confirm password here you can see the reset button so wait first of all let's create another routes for the Post methods so go to roots and copy and I just change the post and we can set here copy this function name and I'll create a new function here so we found your token after we need to find the average weight like a liquid in water some will form the password so we can check password is uh perfect not perfect first of all so if password request password is password is it visible to confirm password C plus one so we're going to inside and folding password does not require so error message password and inform password no no and here in the middle logic so we already get token here so just copy 4ds and we can create password new password hash make password why I am creating inside like this function because we can use directly so we already create real so we will create here so we don't need to make a duplicate coding but we need to change anything about this program so just we can change here so automatic work every place we have used any place this token means that this is the function you use so automatic work available this is I am always Creator unique function okay I think and let me check this is the headphones you know declarable already declared because you have created first one two three four five six password this result okay we need to type here message password successfully reset and we can redirect to login screen so return redirect login wait success password successfullying information okay let me try one by one it's working not working very well refresh the face and also we can sort out this token so what's the issue dollar is a variable because we are not completely semicolon okay let's Express again please the perfect no issue and also I can remember token I can make difference so don't use second time just link so remember token I can use like a different okay let me refresh one two three four five six seven eight nine okay one two three four five six I think on the reset password so let's see so easy password and confirm password does not connect so let's make proper box one two three four five six seven eight nine one two three four five six seven eight nine passwords this is the processing a remember to open variable undefined so let me check what is the value remember to open photo we change this name so let's refresh the other page so then drag in one two three four five six seven eight nine one two three four five six seven eight nine nothing on the resets the get method does not supported for discover because we will make here redirection from take me to the direct home screen so you are ready so you can see it password already reached but this is a redirection let me try again it's working on I go to forget my passwords and I type like a student at that gmail.com let me try again I click on the forgot password so it should show in the method email not found in this system and refresh means I will put against students.com and click on the further password foreign one two three four five six seven eight nine click on the resets so you see reset password one two three four five six let's try is working on working price it's not going to replace enter your current email password so we can type our new password one two three four four six seven eight nine so let's try this login not login location so in this video I'll show you I will show you how to make a forget passwords using link and also we have created like a reset link inside email thank you very much so do you want to like this video so please like and do you want to see like this more video so please subscribe our Channel thank you for watching
Info
Channel: Error Solution
Views: 7,396
Rating: undefined out of 5
Keywords: #email, #database, #laravel, #school_management_system, #mysql, #laravel_project
Id: JxQIctiZXQE
Channel Id: undefined
Length: 27min 15sec (1635 seconds)
Published: Sat Mar 25 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.