宁泽林_NiZerin - 互联网技术博客

  • PHP
  • Go
  • Java
  • Rust
  • Python
  • 交流群
  • 关于我
  • 留言版
  1. 首页
  2. Laravel
  3. 正文

Laravel Artisan 命令大全,你都会用吗?

2019年4月8日 3388点热度 0人点赞 2条评论

Available commands:

命令中文English
clear-compiled删除已编译的类文件Remove the compiled class file
down将应用程序置于维护模式Put the application into maintenance mode
dump-server启动转储服务器以收集转储信息。Start the dump server to collect dump information.
env显示当前的框架环境Display the current framework environment
help显示命令的帮助Displays help for a command
inspire---Display an inspiring quote
list列出命令Lists commands
migrate运行数据库迁移Run the database migrations
optimize缓存框架引导程序文件Cache the framework bootstrap files
preset为应用程序交换前端脚手架Swap the front-end scaffolding for the application
serve在PHP开发服务器上提供应用程序Serve the application on the PHP development server
tinker与您的应用程序互动Interact with your application
up使应用程序退出维护模式Bring the application out of maintenance mode

app

命令中文English
app:name设置应用程序命名空间Set the application namespace

auth

命令中文English
auth:clear-resets刷新过期的密码重置令牌Flush expired password reset tokens

cache

命令中文English
cache:clear刷新应用程序缓存Flush the application cache
cache:forget从缓存中删除项目Remove an item from the cache
cache:table为缓存数据库表创建迁移Create a migration for the cache database table

config

命令中文English
config:cache创建缓存文件以加快配置速度Create a cache file for faster configuration loading
config:clear删除配置缓存文件Remove the configuration cache file

db

命令中文English
db:seed填充数据库Seed the database with records

event

命令中文English
event:generate根据注册生成缺少的事件和侦听器Generate the missing events and listeners based on registration

key

命令中文English
key:generate生成应用程序keySet the application key

lang

命令中文English
lang:publish将语言文件发布到资源目录publish language files to resources directory.

make

命令中文English
make:auth---Scaffold basic login and registration views and routes
make:channel创建一个新的 channel 类Create a new channel class
make:command创建一个新的 Artisan 命令Create a new Artisan command
make:controller创建一个新的控制器类Create a new controller class
make:event---创建一个新的 event 类
make:exception创建一个新的自定义异常类Create a new custom exception class
make:factory创建一个新的模型工厂Create a new model factory
make:job创建一个新的工作类Create a new job class
make:listener创建一个新的事件监听器类Create a new event listener class
make:mail创建一个新的电子邮件类Create a new email class
make:middleware创建一个新的中间件类Create a new middleware class
make:migration创建一个新的迁移文件Create a new migration file
make:model创建一个新的Eloquent模型类Create a new Eloquent model class
make:notification创建一个新的通知类Create a new notification class
make:observer创建一个新的观察者类Create a new observer class
make:policy创建一个新的策略类Create a new policy class
make:provider创建一个新的服务提供者类Create a new service provider class
make:request创建一个新的表单请求类Create a new form request class
make:resource创建一个新资源Create a new resource
make:rule创建新的验证规则Create a new validation rule
make:scaffold代码生成器 —— Laravel 5.x Scaffold GeneratorCreate a laralib scaffold
make:seeder创建一个新的 seeder 类Create a new seeder class
make:test创建一个新的测试类Create a new test class

migrate

命令中文English
migrate:fresh删除所有表并重新运行所有迁移Drop all tables and re-run all migrations
migrate:install创建迁移存储库Create the migration repository
migrate:refresh重置并重新运行所有迁移Reset and re-run all migrations
migrate:reset回滚所有数据库迁移Rollback all database migrations
migrate:rollback回滚上次数据库迁移Rollback the last database migration
migrate:status显示每次迁移的状态Show the status of each migration

notifications

命令中文English
notifications:table为通知表创建迁移Create a migration for the notifications table

optimize

命令中文English
optimize:clear删除缓存的引导程序文件Remove the cached bootstrap files

package

命令中文English
package:discover重建缓存的包清单Rebuild the cached package manifest

queue

命令中文English
queue:failed列出所有 failed 队列工作List all of the failed queue jobs
queue:failed-table为 failed 队列工作数据库表创建迁移Create a migration for the failed queue jobs database table
queue:flush刷新所有failed队列工作Flush all of the failed queue jobs
queue:forget删除failed队列工作Delete a failed queue job
queue:listen监听一个给定的队列Listen to a given queue
queue:restart在当前工作之后重新启动队列工作器守护程序Restart queue worker daemons after their current job
queue:retry重试failed队列作业Retry a failed queue job
queue:table为队列工作数据库表创建迁移Create a migration for the queue jobs database table
queue:work开始将队列上的工作作为守护程序处理Start processing jobs on the queue as a daemon

route

命令中文English
route:cache创建路由缓存文件以加快路由注册速度Create a route cache file for faster route registration
route:clear删除路由缓存文件Remove the route cache file
route:list列出所有注册的路由List all registered routes

schedule

命令中文English
schedule:run运行预定的命令Run the scheduled commands

session

命令中文English
session:table为会话数据库表创建迁移Create a migration for the session database table

storage

命令中文English
storage:link创建从“公共/存储”到“存储/应用/公共”的符号链接Create a symbolic link from "public/storage" to "storage/app/public"

vendor

命令中文English
vendor:publish从供应商包中发布任何可发布的资产Publish any publishable assets from vendor packages

view

命令中文English
view:cache编译所有应用程序的Blade模板Compile all of the application's Blade templates
view:clear清除所有编译的视图文件Clear all compiled view files

转载请注明出处:泽林博客

本作品采用 知识共享署名 4.0 国际许可协议 进行许可
标签: laravel
最后更新:2019年4月8日

NiZerin

博主已经躺平了,后面很少会更新博客。

打赏 点赞
< 上一篇
下一篇 >

文章评论

  • A宜人贷返点

    好久没来了,冒个泡

    2019年4月8日
    回复
  • 拓世智能

    这个有点难啊 http://t.cn/E6WcgjS

    2019年4月10日
    回复
  • razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
    取消回复

    分类
    • Angular
    • CSS3
    • docker
    • Flutter
    • git
    • Go
    • H5
    • Java
    • JavaScript
    • Laravel
    • linux
    • Node.js
    • PHP
    • Python
    • React
    • redis
    • Vue.js
    • windows
    • WordPress
    • 交流
    • 小程序
    • 工具
    • 网站公告
    标签聚合
    php javascript wordpress go flutter translations laravel vue
    友情链接
    • PHP函数字典
    • 宝塔运维特惠
    • 科学上网
    • 阿里云特惠

    COPYRIGHT © 2021 nizer.in. ALL RIGHTS RESERVED.

    Theme Kratos Made By Seaton Jiang