Laravel 8 Authentication with Forgot Password
Step 1: Install Laravel 8 and Laravel UI
First, install a new Laravel 8 project:
Then install Laravel UI and authentication scaffolding:
Step 2: Configure Database and Mail
Update your .env
file for database connection:
Set up mail configuration for password reset:
Step 3: Run Migrations
Migrate the default tables (including users and password resets):
Step 4: Create Home Page
Edit resources/views/home.blade.php
:
Step 5: Customize Register Page
Edit resources/views/auth/register.blade.php
With your custom design.
Your given HTML already fits. Make sure you link assets correctly.
Step 6: Set up Routes
Edit routes/web.php
:
Step 7: Create LoginController
Create controller:
Then define it:
Step 8: Customize Login Page
Edit resources/views/auth/login.blade.php
with your custom design.
Again, your provided HTML code is good. Fix any typos (like in your script tags) if needed.
Example:
(You had a typo: a{{URL::to('ssets/plugins/bootstrap/js/bootstrap.min.js')}}
→ corrected.)
Step 9: Run Laravel Development Server
Finally, start your server:
Visit:
Or if you are using the public
folder:
Done!
You now have Login, Register, Forgot Password working properly in your Laravel 8 application.