1

I have this command in artisan:

php artisan tenants:artisan "migrate" --tenant=22

How can I call this command in Artisan facades?

1 Answers1

1

You can use Artisan

Artisan::call('tenants:artisan migrate --tenant=22') 

import right facade

use Illuminate\Support\Facades\Artisan;

Ref:https://laravel.com/docs/8.x/artisan

John Lobo
  • 14,355
  • 2
  • 10
  • 20