laravel call artisan command from migration code example
Example 1: artisan call migrate result
Artisan::call('migrate');
return Artisan::output();
Example 2: laravel migrate command
php artisan migrate
Artisan::call('migrate');
return Artisan::output();
php artisan migrate