DEV Community

Gerry
Gerry

Posted on • Updated on

How to Clone & Install Laravel Project from github

Open your terminal

  • 1. Clone laravel project
git clone https://github.com/username/repository-name
Enter fullscreen mode Exit fullscreen mode
  • 2. Open the Laravel project folder
cd folder-name
Enter fullscreen mode Exit fullscreen mode
  • 3. Install composer
composer install
Enter fullscreen mode Exit fullscreen mode
  • 4. Copy and paste .env.example to .env
cp .env.example .env
Enter fullscreen mode Exit fullscreen mode
  • 5. Generate a new Laravel key
php artisan key:generate
Enter fullscreen mode Exit fullscreen mode
  • 6. Setup database
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=DATABASE_NAMA
DB_USERNAME=DATABASE_USERNAME
DB_PASSWORD=DATABASE_PASSWORD
Enter fullscreen mode Exit fullscreen mode
  • 7. Migrate laravel database
php artisan migrate

# OR IF YOUR PROJECT HAS A TABLE SEEDER
php artisan migrate --seed
Enter fullscreen mode Exit fullscreen mode

Top comments (0)