Laravel 8 Dashboard Setup Guide (with Authentication & Mail)
This guide will help you set up a Laravel 8 application with authentication scaffolding and mail configuration.
Step 1: Install Laravel 8
Create a new Laravel project by running the following command in your terminal:
composer create-project --prefer-dist laravel/laravel laravel_dashboard_version13
Step 2: Install Laravel UI (Vue + Auth)
Next, install the Laravel UI package and set up Vue scaffolding with authentication:
composer require laravel/ui php artisan ui vue --auth
This will generate the front-end scaffolding along with authentication routes, controllers, and views.
Step 3: Configure Database and Mail Settings
Open your .env
file located in the root of your Laravel project and update the following sections:
Database Configuration
DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=your_db DB_USERNAME=root DB_PASSWORD=your_db_password
Mail Configuration (for Forgot Password)
To enable email notifications (like password resets), update the mail settings:
MAIL_MAILER=smtp MAIL_HOST=smtp.gmail.com MAIL_PORT=587 MAIL_USERNAME=your_email@gmail.com MAIL_PASSWORD=your_email_password MAIL_ENCRYPTION=tls MAIL_FROM_ADDRESS=your_email@gmail.com MAIL_FROM_NAME="${APP_NAME}"
⚠️ Important: If you're using Gmail, make sure to enable "Less Secure Apps" or use an App Password if 2FA is enabled.
Step 4: Run Migrations
Now that everything is configured, run the migrations to create the necessary database tables:
php artisan migrate
Step 5: Start the Development Server
Start the local development server by running:
php artisan serve
Now, open your browser and navigate to:
http://localhost:8000
If your project is inside a subfolder (like public
), access it via:
http://localhost/laravel_dashboard_version14/public/
What You Get
-
Laravel 8 application
-
Vue + Bootstrap frontend
-
Fully functional auth (login, registration, password reset)
-
Mail ready for password recovery