
Laravel 8 Admin Dashboard Setup with Vue Authentication
Step 1: Install Laravel 8
Start by creating a new Laravel project. Open your terminal and run:
composer create-project --prefer-dist laravel/laravel admin_dashboard_v8
Step 2: Install Laravel UI with Vue Auth Scaffolding
Next, install the Laravel UI package:
composer require laravel/ui
Then generate the Vue frontend with built-in authentication:
php artisan ui vue --auth
(Optional) You can also install frontend dependencies and compile them:
npm install && npm run dev
Step 3: Configure Database Credentials
Open your .env
file located at the root of your project, and update the 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_password
Make sure the database your_db
already exists in your MySQL server.
Step 4: Run Migrations
Run the migration command to create the default authentication tables:
php artisan migrate
Step 5: Start the Development Server
Launch the development server using:
php artisan serve
Once the server is running, open your browser and visit the login page:
http://localhost:8000
If you're using a local development environment with a subdirectory (e.g., XAMPP), access it via:
http://localhost/admin_dashboard_v8/public/