在自定义组件的服务注册中进行数据库迁移
并在regist或者boot中调用
use Illuminate\Support\ServiceProvider;
class MemberServiceProvider extends ServiceProvider
{
public function boot()
{
$this->migrationsLoad();
}
//数据库迁移
protected function migrationsLoad(){
$this->loadMigrationsFrom(__DIR__."/../database/migrations");
}
}