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

create a php file and run the code.

<?php
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.
0

you can also look into this. https://github.com/JN-Jones/web-artisan

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

0

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


<?php
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 http://larabook.mburakergenc.com/artisan.php


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.
0

php artisan is php file without .php ,

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

0

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';
});
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

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

Your logo here?

Laravel.io

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

© 2024 Laravel.io - All rights reserved.