In the shell I can create a database migration (for example) like so:
./artisan migrate:make --table="mytable" mymigration
Using Artisan::call() I can't work out how to pass a non-argument parameter ("mymigration" in this example). I have tried many variants of the code below:
Artisan::call('db:migrate', ['--table' => 'mytable', 'mymigration'])
Anyone got any ideas? I have been using shell_exec('./artisan ...') in the meantime but I'm not happy with the approach.
Artisan::call('db:migrate', ['' => 'mymigration', '--table' => 'mytable'])
should work.
Incidentally db:migrate isn't an artisan command out of the box. Are you sure this is correct?