0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

LaravelのartisanをHTTP経由で実行するやつ

Posted at

諸般の事情でSSHできないとかそういう。

環境

Laravel v8.83.23 (PHP v7.4.29)

コード

とりあえずmigrateしたい。

routes/web.php
use Illuminate\Support\Facades\Artisan;

Route::get('/migrate', function () {
    Artisan::call('migrate');

    return Artisan::output();
});

簡単すぎワロタ。

注意

実際にやる場合は認証機能とかでいい感じにするのが良いと思いました。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?