php artisan --env=testing try these
May 11, 2015
4
Level 1
php artisan --env doesn't work on Homestead
On homestead with/without APP_ENV defined (in homestead.yaml) the --env on php artisan doesn't work.
I've searched some problems related but no solution.
I've two database one for dev other for testing when I set --env testing the configuration doesn't change.
Level 88
I always do it like this
php artisan migrate --database=testing
Then you need to update your connections array in the config/database.php file with this
'testing' => [
'driver' => 'sqlite',
'database' => storage_path().'/testing.sqlite',
'prefix' => '',
],
Of course you can replace this with mysql as well, just copy over the mysql stuff and place your test stuff in there ;)
1 like
Please or to participate in this conversation.