Laravel 5 dynamically run migrations

前端 未结 3 1271
天命终不由人
天命终不由人 2021-01-05 02:11

so I have created my own blog package in a structure of Packages/Sitemanager/Blog I have a service provider that looks like the following:

names         


        
3条回答
  •  粉色の甜心
    2021-01-05 02:29

    For the Laravel 7(and properly 6):

    use Illuminate\Support\Facades\Artisan;
    
    
    Artisan::call('migrate');
    

    will greatly work.

提交回复
热议问题