Laravel 8 Dashboard with Authentication
Step 1: Install Laravel 8
Start by creating a new Laravel project using Composer:
composer create-project --prefer-dist laravel/laravel laravel_dashboard_version10
Step 2: Install Laravel UI & Authentication Scaffolding
Laravel UI provides the frontend scaffolding for Vue, React, and Bootstrap, along with built-in authentication.
Run the following commands:
composer require laravel/ui php artisan ui vue --auth
Note: You can replace
vue
withreact
orbootstrap
if preferred.
Step 3: Configure Database
Open your .env
file (located in the project root) and update your database connection settings:
DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=your_db DB_USERNAME=root DB_PASSWORD=your_db_password
Optional: Set up Mail Configuration (For Forgot Password)
To enable password reset emails, update your mail configuration in the .env
file:
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
⚠️ Make sure to enable "Less secure app access" or use an app password if you're using Gmail.
Step 4: Run Migrations
Run the following command to create the necessary tables for authentication:
php artisan migrate
Step 5: Start the Development Server
Start your local server using:
php artisan serve
Then visit the following URL in your browser to see your Laravel app:
http://localhost:8000
Or if using a public path:
http://localhost/laravel_dashboard_version10/public/
Expected response code 250 but got code "550", with message "550 5.7.1 Sender domain not allowed. Please read: http://dhurl.org/20b D157 "