• <i id='fyp9l'><tr id='fyp9l'><dt id='fyp9l'><q id='fyp9l'><span id='fyp9l'><b id='fyp9l'><form id='fyp9l'><ins id='fyp9l'></ins><ul id='fyp9l'></ul><sub id='fyp9l'></sub></form><legend id='fyp9l'></legend><bdo id='fyp9l'><pre id='fyp9l'><center id='fyp9l'></center></pre></bdo></b><th id='fyp9l'></th></span></q></dt></tr></i><div id='fyp9l'><tfoot id='fyp9l'></tfoot><dl id='fyp9l'><fieldset id='fyp9l'></fieldset></dl></div>
    1. <small id='fyp9l'></small><noframes id='fyp9l'>

      1. <legend id='fyp9l'><style id='fyp9l'><dir id='fyp9l'><q id='fyp9l'></q></dir></style></legend><tfoot id='fyp9l'></tfoot>

          <bdo id='fyp9l'></bdo><ul id='fyp9l'></ul>

        可以修改由 artisan migrate 命令创建的模板吗?

        Can one modify the templates created by artisan migrate command?(可以修改由 artisan migrate 命令创建的模板吗?)
          <tbody id='QGKd2'></tbody>
      2. <legend id='QGKd2'><style id='QGKd2'><dir id='QGKd2'><q id='QGKd2'></q></dir></style></legend>

        <tfoot id='QGKd2'></tfoot>
          • <i id='QGKd2'><tr id='QGKd2'><dt id='QGKd2'><q id='QGKd2'><span id='QGKd2'><b id='QGKd2'><form id='QGKd2'><ins id='QGKd2'></ins><ul id='QGKd2'></ul><sub id='QGKd2'></sub></form><legend id='QGKd2'></legend><bdo id='QGKd2'><pre id='QGKd2'><center id='QGKd2'></center></pre></bdo></b><th id='QGKd2'></th></span></q></dt></tr></i><div id='QGKd2'><tfoot id='QGKd2'></tfoot><dl id='QGKd2'><fieldset id='QGKd2'></fieldset></dl></div>
              <bdo id='QGKd2'></bdo><ul id='QGKd2'></ul>

              <small id='QGKd2'></small><noframes id='QGKd2'>

                  本文介绍了可以修改由 artisan migrate 命令创建的模板吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我为我的迁移创建了一个基类.目前我运行 artisan migrate 命令,它创建了一个扩展 Migrations 文件的新迁移,但是我想包含我的 BaseMigration 并从那里扩展它.我一直在手动进行此更改,但我觉得我在不必要地重复自己.

                  I've created a base class for my migrations. At the moment I run the artisan migrate command and it creates a new migration that extends the Migrations file, however I want to include my BaseMigration and extend it from there. I've been making this changes manualy but I feel like I'm repeating myself unnecessarily.

                  关于如何让新迁移自动扩展和加载我的基础迁移有什么建议吗?

                  Any advice on how to have new migrations automatically extend and load my base migration?

                  推荐答案

                  我不认为你可以,因为 Laravel 从 vendor/laravel/framework/src/Illuminate/Database/Migrations/stubs 文件夹,你不能改变它,但你有一些选择:

                  I don't think you can, because Laravel takes migrations from the vendor/laravel/framework/src/Illuminate/Database/Migrations/stubs folder and you cannot change that, but you have some options:

                  1) 创建您自己的工匠命令migrate:makemyown.

                  1) Create your own artisan command migrate:makemyown.

                  2) 使用 Jeffrey Way 的 Laravel 生成器.他们让您通过以下方式创建迁移:

                  2) Use Jeffrey Way's Laravel Generators. They let you create your migrations by doing:

                  php artisan generate:migration create_posts_table --fields="title:string, description:text"
                  

                  如果您只有一些需要开始的字段,而不是更具体的字段,那么它真的很好.

                  If you just have some fields you need to start with and not something more specific than that, it works really fine.

                  3) 编辑 Laravel 存根,但问题是一旦你 composer update 它们可能会被 Composer 覆盖.

                  3) Edit Laravel stubs, but the problem is that as soon as you composer update they might get overwritten by Composer.

                  这篇关于可以修改由 artisan migrate 命令创建的模板吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                  PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                  mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                  Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                  Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                  Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)

                    <bdo id='yNAbI'></bdo><ul id='yNAbI'></ul>
                  • <tfoot id='yNAbI'></tfoot>
                      <legend id='yNAbI'><style id='yNAbI'><dir id='yNAbI'><q id='yNAbI'></q></dir></style></legend>

                      1. <i id='yNAbI'><tr id='yNAbI'><dt id='yNAbI'><q id='yNAbI'><span id='yNAbI'><b id='yNAbI'><form id='yNAbI'><ins id='yNAbI'></ins><ul id='yNAbI'></ul><sub id='yNAbI'></sub></form><legend id='yNAbI'></legend><bdo id='yNAbI'><pre id='yNAbI'><center id='yNAbI'></center></pre></bdo></b><th id='yNAbI'></th></span></q></dt></tr></i><div id='yNAbI'><tfoot id='yNAbI'></tfoot><dl id='yNAbI'><fieldset id='yNAbI'></fieldset></dl></div>
                            <tbody id='yNAbI'></tbody>

                          <small id='yNAbI'></small><noframes id='yNAbI'>