douzhang8144 2018-05-05 11:54
浏览 28
已采纳

如何在laravel中创建构建更新?

I want to know there is any way by which we can create a installer or some package for laravel application by which user can simple paste file and deployer will ask for db host and other setting and install application.

Also is there anyway by which we deploy a new build in current application and it will have all new updates which may contains updates in previous table. We want to keep data safe and release updates.

  • 写回答

1条回答 默认 最新

  • dpbe81245 2018-05-06 05:56
    关注

    Got help from this answer

    Install

    To create installer for your application, you can Laravel-Installer package.

    This package has following features:

    • Check For Server Requirements.
    • Check For Folders Permissions.
    • Ability to set database information.
      • .env text editor
      • .env form wizard
    • Migrate The Database.
    • Seed The Tables.

    Update

    Updating your database mean needs to migrate your database. You can run your migrate command through your application.

    Run migration command from anywhere

    Artisan::call('migrate');
    

    With using route:

    Route::get('/run-migrations', function () {
        return Artisan::call('migrate', ["--force"=> true ]);
    });
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料
  • ¥15 使用R语言marginaleffects包进行边际效应图绘制
  • ¥20 usb设备兼容性问题
  • ¥15 错误(10048): “调用exui内部功能”库命令的参数“参数4”不能接受空数据。怎么解决啊
  • ¥15 安装svn网络有问题怎么办