Reputation: 7105
I am writing an installer for laravel project.
but for some reason, I don't run this installer from laravel project.
I use PHP code. I want to use php artisan migrate
on my installer and I know that I can use this command system("php artisan migrate")
but I don't want to use system functions
on my installer. Is there any way to artisan
command on PHP out of laravel?
Upvotes: 1
Views: 3126
Reputation: 1195
Unfortunately artisan is baked into the Laravel Framework so your options are limited but you still have options.
Upvotes: 2
Reputation: 28
You can use php's exec()
function.
http://php.net/manual/en/function.exec.php
exec('php artisan migrate');
Upvotes: 0