Support the ongoing development of →
Configuration Database Eloquent
Last updated 2 years ago.

create a php file and run the code.

exec("php artisan migrate");

something like that.

or if that hangs try

exec("php artisan migrate > /dev/null &");

you would need to place this script in a public folder in order to run and make sure to set the path to artisan.

Last updated 9 years ago.

you can also look into this.

It is a web based script that says it will let you run artisan commands.


I've created a file named artisan.php in my public directory and I added the following code in it

echo '<br>init with app tables migrations...';
Artisan::call('migrate', ['--path'=> "app/database/migrations"]);
echo '<br>done with app tables migrations';

It gives me the following error when try to visit

init with app tables migrations...
Fatal error: Class 'Artisan' not found in /home/brinddea/public_html/larabook/artisan.php on line 3

For the web script, I installed it but I have no idea about how to use it. Just browsed on google and couldn't find an example.

Last updated 9 years ago.

php artisan is php file without .php ,

so i think if you can run it some how you can do migrate


I actually solved it by creating a new controller.

Here is how did it;

Route::get('migrate', function() {

      echo '<br>init with Migrate tables ...';
      Artisan::call('migrate', ['--quiet' => true, '--force' => true]);
      echo '<br>done with Migrate tables';

Sign in to participate in this thread!


Your banner here too?


We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 - All rights reserved.