Lumen 5.6 php artisan migrate --env=testing not working

2.3k Views Asked by At

  • Lumen Version: 5.6
  • PHP Version: 7.2
  • Database Driver & Version: SQLite 3

Steps To Reproduce:

  • cp .env .env.testing
  • SetAPP_ENV=testing
  • Run php artisan migrate --env=testing

Problem

Old env file configuration is executing.

2

There are 2 best solutions below

2
Sergio On

First:

php artisan cache:clear
php artisan config:cache

You need to specify the environment before the migrate command.

php artisan --env=testing migrate
0
sadaiMudiNaadhar On

I found the solution myself. This feature is not there in this lumen version.

PR LINK FIX