Laravel php artisan 自动生成Model+Migrate+Controller 命令大全
<p><span style="font-size: 18px">php artisan 命令是Laravel框架自带的命令,方便用户快速创建、查看对应的模块参数等。</span></p><p> </p>
<p>一、常用的命令:</p>
<p>php artisan list 查看php artisan所有命令</p>
<p>php artisan --help 查看php artisan的用法</p>
<p>php artisan help admin:make 查看php artisan admin:make的用法</p>
<p>php artisan admin:make --help 查看php artisan admin:make的用法</p>
<p> </p>
<div>创建控制器</div>
<div>
<div><ol class="linenums">
<li class="L0"><code class="language-php"><span class="pln">php artisan make<span class="pun">:<span class="pln">controller Order<span class="typ">Controller</span></span></span></span></code></li>
</ol></div>
<div> </div>
</div>
<div>创建Rest风格资源控制器(带有index、create、store、edit、update、destroy、show方法)</div>
<div>
<div><ol class="linenums">
<li class="L0"><code class="language-php"><span class="pln">php artisan make<span class="pun">:<span class="pln">controller Order<span class="typ">Controller<span class="pln"> <span class="pun">--<span class="pln">resource</span></span></span></span></span></span></span></code></li>
</ol></div>
</div>
<div> </div>
<div>创建模型</div>
<div>
<div><ol class="linenums">
<li class="L0"><code class="language-php"><span class="pln">php artisan make<span class="pun">:<span class="pln">model <span class="typ">Student</span></span></span></span></code></li>
</ol></div>
<div> </div>
</div>
<div>创建新建表的迁移和修改表的迁移</div>
<div>
<div><ol class="linenums">
<li class="L0"><code class="language-php"><span class="pln">php artisan make<span class="pun">:<span class="pln">migration create_orders_table <span class="pun">--<span class="pln">create<span class="pun">=<span class="pln">orders <span class="com">//创建订单表orders</span></span></span></span></span></span></span></span></code></li>
<li class="L1"><code class="language-php"><span class="pln">php artisan make<span class="pun">:<span class="pln">migration add_tags_to_orders_table <span class="pun">--<span class="pln">table<span class="pun">=orders<span class="pln"><span class="com">//给orders表增加tags字段</span></span></span></span></span></span></span></span></code></li>
</ol></div>
<div> </div>
</div>
<div>执行迁移</div>
<div><ol class="linenums">
<li class="L0"><code class="language-php"><span class="pln">php artisan migrate</span></code></li>
</ol></div>
<div> </div>
<div>创建模型的时候同时生成新建表的迁移+控制器+路由</div>
<div>
<div><ol class="linenums">
<li class="L0"><code class="language-php"><span class="pln">php artisan make<span class="pun">:<span class="pln">model <span class="typ">Order<span class="pln"> <span class="pun">-<span class="pln">m -c -r</span></span></span></span></span></span></span></code></li>
</ol></div>
</div>
<div> </div>
<div>回滚上一次的迁移</div>
<div>
<div><ol class="linenums">
<li class="L0"><code class="language-php"><span class="pln">php artisan migrate<span class="pun">:<span class="pln">rollback</span></span></span></code></li>
</ol></div>
<div> </div>
</div>
<div>回滚所有迁移</div>
<div>
<div><ol class="linenums">
<li class="L0"><code class="language-php"><span class="pln">php artisan migrate<span class="pun">:<span class="pln">reset</span></span></span></code></li>
</ol></div>
<div> </div>
</div>
<div>创建填充</div>
<div>
<div><ol class="linenums">
<li class="L0"><code class="language-php"><span class="pln">php artisan make<span class="pun">:<span class="pln">seeder <span class="typ">OrderTableSeeder</span></span></span></span></code></li>
</ol></div>
<div> </div>
</div>
<div>执行单个填充</div>
<div>
<div><ol class="linenums">
<li class="L0"><code class="language-php"><span class="pln">php artisan db<span class="pun">:<span class="pln">seed <span class="pun">--<span class="kwd">class<span class="pun">=<span class="typ">OrderTableSeeder</span></span></span></span></span></span></span></code></li>
</ol></div>
<div> </div>
</div>
<div>执行所有填充</div>
<div>
<div><ol class="linenums">
<li class="L0"><code class="language-php"><span class="pln">php artisan db<span class="pun">:<span class="pln">seed</span></span></span></code></li>
</ol></div>
<div> </div>
</div>
<div>创建中间件(app/Http/Middleware 下)</div>
<div>
<div><ol class="linenums">
<li class="L0"><code class="language-php"><span class="pln">php artisan make<span class="pun">:<span class="pln">middleware <span class="typ">Activity</span></span></span></span></code></li>
</ol></div>
<div> </div>
</div>
<div>创建队列(数据库)的表迁移(需要执行迁移才生效)</div>
<div>
<div><ol class="linenums">
<li class="L0"><code class="language-php"><span class="pln">php artisan queue<span class="pun">:<span class="pln">table</span></span></span></code></li>
</ol></div>
<div> </div>
</div>
<div>创建队列类(app/jobs下):</div>
<div>
<div><ol class="linenums">
<li class="L0"><code class="language-php"><span class="pln">php artisan make<span class="pun">:<span class="pln">job <span class="typ">SendEmail</span></span></span></span></code></li>
</ol></div>
<div> </div>
</div>
<div>
<div>创建请求类(app/Http/Requests下)</div>
<div><ol class="linenums">
<li class="L0"><code class="language-php"><span class="pln">php artisan make<span class="pun">:<span class="pln">request <span class="typ">CreateArticleRequest</span></span></span></span></code></li>
</ol>
<p> </p>
</div>
</div>
<p>二、通常一个laravel项目的后台管理系统搭建流程,如下</p>
<p>1、下载Laravel框架,安装Laravel-admin后台管理框架,进行基础的数据库连接配置,上传配置,https/http访问方式等</p>
<p>2、Linux服务器下面,进入项目的根目录,可以用php artisan make命令创建模型+数据迁移+控制器。</p>
<p>3、用php artisan admin:make 创建后台的控制器,可以写脚本批量创建。之后根据业务逻辑,编写控制器内容。</p>
<p>4、为后台的控制器创建对于的路由,可以写脚本批量创建。</p>
<p>5、登录Laravel-admin后台系统,设置对应的菜单。</p>
<p> </p>
<h2><span style="font-size: 16px">三、Laravel Artisan 命令大全</span></h2>
<h2 id="2dd878"><span style="font-size: 16px">Available commands:</span></h2>
<table style="height: 266px; width: 1041px">
<thead>
<tr><th><span style="font-size: 16px">命令</span></th><th><span style="font-size: 16px">中文</span></th><th><span style="font-size: 16px">English</span></th></tr>
</thead>
<tbody>
<tr>
<td><span style="font-size: 16px">clear-compiled</span></td>
<td><span style="font-size: 16px">删除已编译的类文件</span></td>
<td><span style="font-size: 16px">Remove the compiled class file</span></td>
</tr>
<tr>
<td style="text-align: left"><span style="font-size: 16px">down</span></td>
<td><span style="font-size: 16px">将应用程序置于维护模式</span></td>
<td><span style="font-size: 16px">Put the application into maintenance mode</span></td>
</tr>
<tr>
<td><span style="font-size: 16px">dump-server</span></td>
<td><span style="font-size: 16px">启动转储服务器以收集转储信息。</span></td>
<td><span style="font-size: 16px">Start the dump server to collect dump information.</span></td>
</tr>
<tr>
<td><span style="font-size: 16px">env</span></td>
<td><span style="font-size: 16px">显示当前的框架环境</span></td>
<td><span style="font-size: 16px">Display the current framework environment</span></td>
</tr>
<tr>
<td><span style="font-size: 16px">help</span></td>
<td><span style="font-size: 16px">显示命令的帮助</span></td>
<td><span style="font-size: 16px">Displays help for a command</span></td>
</tr>
<tr>
<td><span style="font-size: 16px">inspire</span></td>
<td><span style="font-size: 16px">---</span></td>
<td><span style="font-size: 16px">Display an inspiring quote</span></td>
</tr>
<tr>
<td><span style="font-size: 16px">list</span></td>
<td><span style="font-size: 16px">列出命令</span></td>
<td><span style="font-size: 16px">Lists commands</span></td>
</tr>
<tr>
<td><span style="font-size: 16px">migrate</span></td>
<td><span style="font-size: 16px">运行数据库迁移</span></td>
<td><span style="font-size: 16px">Run the database migrations</span></td>
</tr>
<tr>
<td><span style="font-size: 16px">optimize</span></td>
<td><span style="font-size: 16px">缓存框架引导程序文件</span></td>
<td><span style="font-size: 16px">Cache the framework bootstrap files</span></td>
</tr>
<tr>
<td><span style="font-size: 16px">preset</span></td>
<td><span style="font-size: 16px">为应用程序交换前端脚手架</span></td>
<td><span style="font-size: 16px">Swap the front-end scaffolding for the application</span></td>
</tr>
<tr>
<td><span style="font-size: 16px">serve</span></td>
<td><span style="font-size: 16px">在 PHP 开发服务器上提供应用程序</span></td>
<td><span style="font-size: 16px">Serve the application on the PHP development server</span></td>
</tr>
<tr>
<td><span style="font-size: 16px">tinker</span></td>
<td><span style="font-size: 16px">与您的应用程序互动</span></td>
<td><span style="font-size: 16px">Interact with your application</span></td>
</tr>
<tr>
<td><span style="font-size: 16px">up</span></td>
<td><span style="font-size: 16px">使应用程序退出维护模式</span></td>
<td><span style="font-size: 16px">Bring the application out of maintenance mode</span></td>
</tr>
</tbody>
</table>
<div data-unique="d2a57d"><span style="font-size: 16px"> </span></div>
<h2 id="d2a57d"><span style="font-size: 16px">app</span></h2>
<table style="height: 41px; width: 999px">
<thead>
<tr><th><span style="font-size: 16px">命令</span></th><th><span style="font-size: 16px">中文</span></th><th><span style="font-size: 16px">English</span></th></tr>
</thead>
<tbody>
<tr>
<td><span style="font-size: 16px">app:name</span></td>
<td><span style="font-size: 16px">设置应用程序命名空间</span></td>
<td><span style="font-size: 16px">Set the application namespace</span></td>
</tr>
</tbody>
</table>
<div data-unique="fa53b9"><span style="font-size: 16px"> </span></div>
<h2 id="fa53b9"><span style="font-size: 16px">auth</span></h2>
<table style="height: 56px; width: 762px">
<thead>
<tr><th><span style="font-size: 16px">命令</span></th><th><span style="font-size: 16px">中文</span></th><th><span style="font-size: 16px">English</span></th></tr>
</thead>
<tbody>
<tr>
<td><span style="font-size: 16px">auth:clear-resets</span></td>
<td><span style="font-size: 16px">刷新过期的密码重置令牌</span></td>
<td><span style="font-size: 16px">Flush expired password reset tokens</span></td>
</tr>
</tbody>
</table>
<div data-unique="0fea6a"><span style="font-size: 16px"> </span></div>
<h2 id="0fea6a"><span style="font-size: 16px">cache</span></h2>
<table style="height: 76px; width: 923px">
<thead>
<tr><th><span style="font-size: 16px">命令</span></th><th><span style="font-size: 16px">中文</span></th><th><span style="font-size: 16px">English</span></th></tr>
</thead>
<tbody>
<tr>
<td><span style="font-size: 16px">cache:clear</span></td>
<td><span style="font-size: 16px">刷新应用程序缓存</span></td>
<td><span style="font-size: 16px">Flush the application cache</span></td>
</tr>
<tr>
<td><span style="font-size: 16px">cache:forget</span></td>
<td><span style="font-size: 16px">从缓存中删除项目</span></td>
<td><span style="font-size: 16px">Remove an item from the cache</span></td>
</tr>
<tr>
<td><span style="font-size: 16px">cache:table</span></td>
<td><span style="font-size: 16px">为缓存数据库表创建迁移</span></td>
<td><span style="font-size: 16px">Create a migration for the cache database table</span></td>
</tr>
</tbody>
</table>
<div data-unique="224502"><span style="font-size: 16px"> </span></div>
<h2 id="224502"><span style="font-size: 16px">config</span></h2>
<table>
<thead>
<tr><th><span style="font-size: 16px">命令</span></th><th><span style="font-size: 16px">中文</span></th><th><span style="font-size: 16px">English</span></th></tr>
</thead>
<tbody>
<tr>
<td><span style="font-size: 16px">config:cache</span></td>
<td><span style="font-size: 16px">创建缓存文件以加快配置速度</span></td>
<td><span style="font-size: 16px">Create a cache file for faster configuration loading</span></td>
</tr>
<tr>
<td><span style="font-size: 16px">config:clear</span></td>
<td><span style="font-size: 16px">删除配置缓存文件</span></td>
<td><span style="font-size: 16px">Remove the configuration cache file</span></td>
</tr>
</tbody>
</table>
<div data-unique="d77d5e"><span style="font-size: 16px"> </span></div>
<h2 id="d77d5e"><span style="font-size: 16px">db</span></h2>
<table>
<thead>
<tr><th><span style="font-size: 16px">命令</span></th><th><span style="font-size: 16px">中文</span></th><th><span style="font-size: 16px">English</span></th></tr>
</thead>
<tbody>
<tr>
<td><span style="font-size: 16px">db:seed</span></td>
<td><span style="font-size: 16px">填充数据库</span></td>
<td><span style="font-size: 16px">Seed the database with records</span></td>
</tr>
</tbody>
</table>
<div data-unique="411963"><span style="font-size: 16px"> </span></div>
<h2 id="411963"><span style="font-size: 16px">event</span></h2>
<table>
<thead>
<tr><th><span style="font-size: 16px">命令</span></th><th><span style="font-size: 16px">中文</span></th><th><span style="font-size: 16px">English</span></th></tr>
</thead>
<tbody>
<tr>
<td><span style="font-size: 16px">event:generate</span></td>
<td><span style="font-size: 16px">根据注册生成缺少的事件和侦听器</span></td>
<td><span style="font-size: 16px">Generate the missing events and listeners based on registration</span></td>
</tr>
</tbody>
</table>
<div data-unique="3c6e0b"><span style="font-size: 16px"> </span></div>
<h2 id="3c6e0b"><span style="font-size: 16px">key</span></h2>
<table>
<thead>
<tr><th><span style="font-size: 16px">命令</span></th><th><span style="font-size: 16px">中文</span></th><th><span style="font-size: 16px">English</span></th></tr>
</thead>
<tbody>
<tr>
<td><span style="font-size: 16px">key:generate</span></td>
<td><span style="font-size: 16px">生成应用程序 key</span></td>
<td><span style="font-size: 16px">Set the application key</span></td>
</tr>
</tbody>
</table>
<div data-unique="757255"><span style="font-size: 16px"> </span></div>
<h2 id="757255"><span style="font-size: 16px">lang</span></h2>
<table>
<thead>
<tr><th><span style="font-size: 16px">命令</span></th><th><span style="font-size: 16px">中文</span></th><th><span style="font-size: 16px">English</span></th></tr>
</thead>
<tbody>
<tr>
<td><span style="font-size: 16px">lang:publish</span></td>
<td><span style="font-size: 16px">将语言文件发布到资源目录</span></td>
<td><span style="font-size: 16px">publish language files to resources directory.</span></td>
</tr>
</tbody>
</table>
<div data-unique="099daf"><span style="font-size: 16px"> </span></div>
<h2 id="099daf"><span style="font-size: 16px">make</span></h2>
<table>
<thead>
<tr><th><span style="font-size: 16px">命令</span></th><th><span style="font-size: 16px">中文</span></th><th><span style="font-size: 16px">English</span></th></tr>
</thead>
<tbody>
<tr>
<td><span style="font-size: 16px">make:auth</span></td>
<td><span style="font-size: 16px">---</span></td>
<td><span style="font-size: 16px">Scaffold basic login and registration views and routes</span></td>
</tr>
<tr>
<td><span style="font-size: 16px">make:channel</span></td>
<td><span style="font-size: 16px">创建一个新的 <code>channel</code> 类</span></td>
<td><span style="font-size: 16px">Create a new channel class</span></td>
</tr>
<tr>
<td><span style="font-size: 16px">make:command</span></td>
<td><span style="font-size: 16px">创建一个新的 <code>Artisan</code> 命令</span></td>
<td><span style="font-size: 16px">Create a new Artisan command</span></td>
</tr>
<tr>
<td><span style="font-size: 16px">make:controller</span></td>
<td><span style="font-size: 16px">创建一个新的控制器类</span></td>
<td><span style="font-size: 16px">Create a new controller class</span></td>
</tr>
<tr>
<td><span style="font-size: 16px">make:event</span></td>
<td><span style="font-size: 16px">---</span></td>
<td><span style="font-size: 16px">创建一个新的 <code>event</code> 类</span></td>
</tr>
<tr>
<td><span style="font-size: 16px">make:exception</span></td>
<td><span style="font-size: 16px">创建一个新的自定义异常类</span></td>
<td><span style="font-size: 16px">Create a new custom exception class</span></td>
</tr>
<tr>
<td><span style="font-size: 16px">make:factory</span></td>
<td><span style="font-size: 16px">创建一个新的模型工厂</span></td>
<td><span style="font-size: 16px">Create a new model factory</span></td>
</tr>
<tr>
<td><span style="font-size: 16px">make:job</span></td>
<td><span style="font-size: 16px">创建一个新的工作类</span></td>
<td><span style="font-size: 16px">Create a new job class</span></td>
</tr>
<tr>
<td><span style="font-size: 16px">make:listener</span></td>
<td><span style="font-size: 16px">创建一个新的事件监听器类</span></td>
<td><span style="font-size: 16px">Create a new event listener class</span></td>
</tr>
<tr>
<td><span style="font-size: 16px">make:mail</span></td>
<td><span style="font-size: 16px">创建一个新的电子邮件类</span></td>
<td><span style="font-size: 16px">Create a new email class</span></td>
</tr>
<tr>
<td><span style="font-size: 16px">make:middleware</span></td>
<td><span style="font-size: 16px">创建一个新的中间件类</span></td>
<td><span style="font-size: 16px">Create a new middleware class</span></td>
</tr>
<tr>
<td><span style="font-size: 16px">make:migration</span></td>
<td><span style="font-size: 16px">创建一个新的迁移文件</span></td>
<td><span style="font-size: 16px">Create a new migration file</span></td>
</tr>
<tr>
<td><span style="font-size: 16px">make:model</span></td>
<td><span style="font-size: 16px">创建一个新的 Eloquent 模型类</span></td>
<td><span style="font-size: 16px">Create a new Eloquent model class</span></td>
</tr>
<tr>
<td><span style="font-size: 16px">make:notification</span></td>
<td><span style="font-size: 16px">创建一个新的通知类</span></td>
<td><span style="font-size: 16px">Create a new notification class</span></td>
</tr>
<tr>
<td><span style="font-size: 16px">make:observer</span></td>
<td><span style="font-size: 16px">创建一个新的观察者类</span></td>
<td><span style="font-size: 16px">Create a new observer class</span></td>
</tr>
<tr>
<td><span style="font-size: 16px">make:policy</span></td>
<td><span style="font-size: 16px">创建一个新的策略类</span></td>
<td><span style="font-size: 16px">Create a new policy class</span></td>
</tr>
<tr>
<td><span style="font-size: 16px">make:provider</span></td>
<td><span style="font-size: 16px">创建一个新的服务提供者类</span></td>
<td><span style="font-size: 16px">Create a new service provider class</span></td>
</tr>
<tr>
<td><span style="font-size: 16px">make:request</span></td>
<td><span style="font-size: 16px">创建一个新的表单请求类</span></td>
<td><span style="font-size: 16px">Create a new form request class</span></td>
</tr>
<tr>
<td><span style="font-size: 16px">make:resource</span></td>
<td><span style="font-size: 16px">创建一个新资源</span></td>
<td><span style="font-size: 16px">Create a new resource</span></td>
</tr>
<tr>
<td><span style="font-size: 16px">make:rule</span></td>
<td><span style="font-size: 16px">创建新的验证规则</span></td>
<td><span style="font-size: 16px">Create a new validation rule</span></td>
</tr>
<tr>
<td><span style="font-size: 16px">make:scaffold</span></td>
<td><span style="font-size: 16px">代码生成器 — Laravel 5.x Scaffold Generator</span></td>
<td><span style="font-size: 16px">Create a laralib scaffold</span></td>
</tr>
<tr>
<td><span style="font-size: 16px">make:seeder</span></td>
<td><span style="font-size: 16px">创建一个新的 <code>seeder</code> 类</span></td>
<td><span style="font-size: 16px">Create a new seeder class</span></td>
</tr>
<tr>
<td><span style="font-size: 16px">make:test</span></td>
<td><span style="font-size: 16px">创建一个新的测试类</span></td>
<td><span style="font-size: 16px">Create a new test class</span></td>
</tr>
</tbody>
</table>
<div data-unique="f183fd"><span style="font-size: 16px"> </span></div>
<h2 id="f183fd"><span style="font-size: 16px">migrate</span></h2>
<table>
<thead>
<tr><th><span style="font-size: 16px">命令</span></th><th><span style="font-size: 16px">中文</span></th><th><span style="font-size: 16px">English</span></th></tr>
</thead>
<tbody>
<tr>
<td><span style="font-size: 16px">migrate:fresh</span></td>
<td><span style="font-size: 16px">删除所有表并重新运行所有迁移</span></td>
<td><span style="font-size: 16px">Drop all tables and re-run all migrations</span></td>
</tr>
<tr>
<td><span style="font-size: 16px">migrate:install</span></td>
<td><span style="font-size: 16px">创建迁移存储库</span></td>
<td><span style="font-size: 16px">Create the migration repository</span></td>
</tr>
<tr>
<td><span style="font-size: 16px">migrate:refresh</span></td>
<td><span style="font-size: 16px">重置并重新运行所有迁移</span></td>
<td><span style="font-size: 16px">Reset and re-run all migrations</span></td>
</tr>
<tr>
<td><span style="font-size: 16px">migrate:reset</span></td>
<td><span style="font-size: 16px">回滚所有数据库迁移</span></td>
<td><span style="font-size: 16px">Rollback all database migrations</span></td>
</tr>
<tr>
<td><span style="font-size: 16px">migrate:rollback</span></td>
<td><span style="font-size: 16px">回滚上次数据库迁移</span></td>
<td><span style="font-size: 16px">Rollback the last database migration</span></td>
</tr>
<tr>
<td><span style="font-size: 16px">migrate:status</span></td>
<td><span style="font-size: 16px">显示每次迁移的状态</span></td>
<td><span style="font-size: 16px">Show the status of each migration</span></td>
</tr>
</tbody>
</table>
<div data-unique="f37bd2"><span style="font-size: 16px"> </span></div>
<h2 id="f37bd2"><span style="font-size: 16px">notifications</span></h2>
<table>
<thead>
<tr><th><span style="font-size: 16px">命令</span></th><th><span style="font-size: 16px">中文</span></th><th><span style="font-size: 16px">English</span></th></tr>
</thead>
<tbody>
<tr>
<td><span style="font-size: 16px">notifications:table</span></td>
<td><span style="font-size: 16px">为通知表创建迁移</span></td>
<td><span style="font-size: 16px">Create a migration for the notifications table</span></td>
</tr>
</tbody>
</table>
<div data-unique="c14f7a"><span style="font-size: 16px"> </span></div>
<h2 id="c14f7a"><span style="font-size: 16px">optimize</span></h2>
<table>
<thead>
<tr><th><span style="font-size: 16px">命令</span></th><th><span style="font-size: 16px">中文</span></th><th><span style="font-size: 16px">English</span></th></tr>
</thead>
<tbody>
<tr>
<td><span style="font-size: 16px">optimize:clear</span></td>
<td><span style="font-size: 16px">删除缓存的引导程序文件</span></td>
<td><span style="font-size: 16px">Remove the cached bootstrap files</span></td>
</tr>
</tbody>
</table>
<div data-unique="efe90a"><span style="font-size: 16px"> </span></div>
<h2 id="efe90a"><span style="font-size: 16px">package</span></h2>
<table>
<thead>
<tr><th><span style="font-size: 16px">命令</span></th><th><span style="font-size: 16px">中文</span></th><th><span style="font-size: 16px">English</span></th></tr>
</thead>
<tbody>
<tr>
<td><span style="font-size: 16px">package:discover</span></td>
<td><span style="font-size: 16px">重建缓存的包清单</span></td>
<td><span style="font-size: 16px">Rebuild the cached package manifest</span></td>
</tr>
</tbody>
</table>
<div data-unique="a9d1cb"><span style="font-size: 16px"> </span></div>
<h2 id="a9d1cb"><span style="font-size: 16px">queue</span></h2>
<table>
<thead>
<tr><th><span style="font-size: 16px">命令</span></th><th><span style="font-size: 16px">中文</span></th><th><span style="font-size: 16px">English</span></th></tr>
</thead>
<tbody>
<tr>
<td><span style="font-size: 16px">queue:failed</span></td>
<td><span style="font-size: 16px">列出所有 <code>failed</code> 队列工作</span></td>
<td><span style="font-size: 16px">List all of the failed queue jobs</span></td>
</tr>
<tr>
<td><span style="font-size: 16px">queue:failed-table</span></td>
<td><span style="font-size: 16px">为 <code>failed</code> 队列工作数据库表创建迁移</span></td>
<td><span style="font-size: 16px">Create a migration for the failed queue jobs database table</span></td>
</tr>
<tr>
<td><span style="font-size: 16px">queue:flush</span></td>
<td><span style="font-size: 16px">刷新所有 <code>failed</code> 队列工作</span></td>
<td><span style="font-size: 16px">Flush all of the failed queue jobs</span></td>
</tr>
<tr>
<td><span style="font-size: 16px">queue:forget</span></td>
<td><span style="font-size: 16px">删除 <code>failed</code> 队列工作</span></td>
<td><span style="font-size: 16px">Delete a failed queue job</span></td>
</tr>
<tr>
<td><span style="font-size: 16px">queue:listen</span></td>
<td><span style="font-size: 16px">监听一个给定的队列</span></td>
<td><span style="font-size: 16px">Listen to a given queue</span></td>
</tr>
<tr>
<td><span style="font-size: 16px">queue:restart</span></td>
<td><span style="font-size: 16px">在当前工作之后重新启动队列工作器守护程序</span></td>
<td><span style="font-size: 16px">Restart queue worker daemons after their current job</span></td>
</tr>
<tr>
<td><span style="font-size: 16px">queue:retry</span></td>
<td><span style="font-size: 16px">重试 <code>failed</code> 队列作业</span></td>
<td><span style="font-size: 16px">Retry a failed queue job</span></td>
</tr>
<tr>
<td><span style="font-size: 16px">queue:table</span></td>
<td><span style="font-size: 16px">为队列工作数据库表创建迁移</span></td>
<td><span style="font-size: 16px">Create a migration for the queue jobs database table</span></td>
</tr>
<tr>
<td><span style="font-size: 16px">queue:work</span></td>
<td><span style="font-size: 16px">开始将队列上的工作作为守护程序处理</span></td>
<td><span style="font-size: 16px">Start processing jobs on the queue as a daemon</span></td>
</tr>
</tbody>
</table>
<div data-unique="9c4640"><span style="font-size: 16px"> </span></div>
<h2 id="9c4640"><span style="font-size: 16px">route</span></h2>
<table>
<thead>
<tr><th><span style="font-size: 16px">命令</span></th><th><span style="font-size: 16px">中文</span></th><th><span style="font-size: 16px">English</span></th></tr>
</thead>
<tbody>
<tr>
<td><span style="font-size: 16px">route:cache</span></td>
<td><span style="font-size: 16px">创建路由缓存文件以加快路由注册速度</span></td>
<td><span style="font-size: 16px">Create a route cache file for faster route registration</span></td>
</tr>
<tr>
<td><span style="font-size: 16px">route:clear</span></td>
<td><span style="font-size: 16px">删除路由缓存文件</span></td>
<td><span style="font-size: 16px">Remove the route cache file</span></td>
</tr>
<tr>
<td><span style="font-size: 16px">route:list</span></td>
<td><span style="font-size: 16px">列出所有注册的路由</span></td>
<td><span style="font-size: 16px">List all registered routes</span></td>
</tr>
</tbody>
</table>
<div data-unique="799855"><span style="font-size: 16px"> </span></div>
<h2 id="799855"><span style="font-size: 16px">schedule</span></h2>
<table>
<thead>
<tr><th><span style="font-size: 16px">命令</span></th><th><span style="font-size: 16px">中文</span></th><th><span style="font-size: 16px">English</span></th></tr>
</thead>
<tbody>
<tr>
<td><span style="font-size: 16px">schedule:run</span></td>
<td><span style="font-size: 16px">运行预定的命令</span></td>
<td><span style="font-size: 16px">Run the scheduled commands</span></td>
</tr>
</tbody>
</table>
<div data-unique="21d6f4"><span style="font-size: 16px"> </span></div>
<h2 id="21d6f4"><span style="font-size: 16px">session</span></h2>
<table>
<thead>
<tr><th><span style="font-size: 16px">命令</span></th><th><span style="font-size: 16px">中文</span></th><th><span style="font-size: 16px">English</span></th></tr>
</thead>
<tbody>
<tr>
<td><span style="font-size: 16px">session:table</span></td>
<td><span style="font-size: 16px">为会话数据库表创建迁移</span></td>
<td><span style="font-size: 16px">Create a migration for the session database table</span></td>
</tr>
</tbody>
</table>
<div data-unique="ddeceb"><span style="font-size: 16px"> </span></div>
<h2 id="ddeceb"><span style="font-size: 16px">storage</span></h2>
<table>
<thead>
<tr><th><span style="font-size: 16px">命令</span></th><th><span style="font-size: 16px">中文</span></th><th><span style="font-size: 16px">English</span></th></tr>
</thead>
<tbody>
<tr>
<td><span style="font-size: 16px">storage:link</span></td>
<td><span style="font-size: 16px">创建从 “公共 / 存储” 到 “存储 / 应用 / 公共” 的符号链接</span></td>
<td><span style="font-size: 16px">Create a symbolic link from "public/storage" to "storage/app/public"</span></td>
</tr>
</tbody>
</table>
<div data-unique="7c3613"><span style="font-size: 16px"> </span></div>
<h2 id="7c3613"><span style="font-size: 16px">vendor</span></h2>
<table>
<thead>
<tr><th><span style="font-size: 16px">命令</span></th><th><span style="font-size: 16px">中文</span></th><th><span style="font-size: 16px">English</span></th></tr>
</thead>
<tbody>
<tr>
<td><span style="font-size: 16px">vendor:publish</span></td>
<td><span style="font-size: 16px">从供应商包中发布任何可发布的资产</span></td>
<td><span style="font-size: 16px">Publish any publishable assets from vendor packages</span></td>
</tr>
</tbody>
</table>
<div data-unique="1bda80"><span style="font-size: 16px"> </span></div>
<h2 id="1bda80"><span style="font-size: 16px">view</span></h2>
<p> </p>
<table>
<thead>
<tr><th><span style="font-size: 16px">命令</span></th><th><span style="font-size: 16px">中文</span></th><th><span style="font-size: 16px">English</span></th></tr>
</thead>
<tbody>
<tr>
<td><span style="font-size: 16px">view:cache</span></td>
<td><span style="font-size: 16px">编译所有应用程序的 Blade 模板</span></td>
<td><span style="font-size: 16px">Compile all of the application's Blade templates</span></td>
</tr>
<tr>
<td><span style="font-size: 16px">view:clear</span></td>
<td><span style="font-size: 16px">清除所有编译的视图文件</span></td>
<td><span style="font-size: 16px">Clear all compiled view files</span><br><br></td>
</tr>
</tbody>
</table>
<p> </p>
<p><img src="https://img2018.cnblogs.com/i-beta/1673958/201912/1673958-20191207103952883-1998633477.png"></p>
<p> </p>
<p> </p>
<p> <img src="https://img2018.cnblogs.com/i-beta/1673958/201912/1673958-20191207104325979-369821787.png"></p>
<p> </p>
<p> </p>
<p> </p>
<p> <img src="https://img2018.cnblogs.com/i-beta/1673958/201912/1673958-20191207104150967-312322457.png"></p>
<p> </p>
<p> </p>
<p> <img src="https://img2018.cnblogs.com/i-beta/1673958/201912/1673958-20191207104422293-259629307.png"></p>
<p> </p>
<p> </p>
<p> </p><br><br>
来源:https://www.cnblogs.com/myzan/p/12000857.html
頁:
[1]