How to Clone and Set Up a Laravel 11 Project with Multiple Dashboards
If you're starting a new Laravel 11 project or setting up a cloned one with multiple dashboards, follow this step-by-step guide to get your development environment up and running smoothly.
Prerequisites
Before cloning the Laravel project, ensure the following tools are installed on your system:
1. Git
Git is a version control system used to track code changes.
š Download: https://git-scm.com/
š” Check version:
git --version
2. PHP
Laravel requires PHP version 7.3 or higher.
š” Check version:
php -v
3. Composer
Composer is a dependency manager for PHP, essential for installing Laravel packages.
š Download: https://getcomposer.org/
š” Check version:
composer -V
4. Web Server
Laravel includes a built-in development server, but for production, use Apache or Nginx.
5. Database
Make sure a supported database system like MySQL, PostgreSQL, or SQLite is installed. You'll need it if the project interacts with a database.
Clone and Set Up the Project
1. Clone the Repository
Open your terminal and run:
git clone https://gitlab.com/SoengSouy/sample-laravel-11-multiple-dashboard-premium.git
Replace the URL with your project repository if needed.
2. Navigate to the Project Directory
cd sample-laravel-11-multiple-dashboard-premium
3. Install Composer Dependencies
composer install
This installs all required PHP packages defined in composer.json
.
4. Create a .env
File
Laravel uses an .env
file to manage environment variables. Duplicate the example file:
cp .env.example .env
Edit the .env
file to set up your database and other configurations.
5. Generate Application Key
php artisan key:generate
This will generate a secure APP_KEY
for your Laravel app.
6. Configure Database Connection
Open the .env
file and update the following values with your database credentials:
DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=your_db DB_USERNAME=root DB_PASSWORD=your_db_password
7. Run Migrations
php artisan migrate
This creates the necessary database tables.
8. Start the Development Server
php artisan serve
Your Laravel application will be available at:
š http://localhost:8000
You’re Ready to Go!
You’ve successfully cloned and configured a Laravel 11 project with multiple dashboards. You can now start developing or customizing features based on your needs.