A
A
adam_carraway2020-07-28 12:16:15
Laravel
adam_carraway, 2020-07-28 12:16:15

Running an Artisan command outside of the console, why doesn't it work as expected?

When the command is called, it seems that the value of the --env option is not taken into account and instead of clearing the database for tests, it cleans the main database. Why is that?

Artisan::call('db:wipe', [
            '--database' => 'mysql_1', '--drop-views' => true, '--env' => 'testing'
        ]);

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
JhaoDa, 2020-07-28
@adam_carraway

Because this option only works in the console .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question