Laravel57 artisan详解

Laravel57 artisan详解

进入根目录  php artisan list

Laravel Framework 5.7.15

Usage:
  command [options] [arguments]

Options:
  -h, --help            Display this help message
  -q, --quiet           抑制输出信息
  -V, --version         打印 Laravel 的版本信息
      --ansi            强制输出 ANSI 格式
      --no-ansi         禁止输出 ANSI 格式
  -n, --no-interaction  不询问任何交互性的问题
      --env[=ENV]       显示当前命令行运行的环境
  -v|vv|vvv, --verbose  通过增加 v 的个数来控制命令行输出内容的详尽情况: 1 个代表正常输出, 2 个代表输出更多消息, 3 个代表调试

Available commands:
  DemoCommand          DemoCommand 自定义的命令
  clear-compiled       移除编译优化过的文件 (storage/frameworks/compiled.php)
  down                 进入维护模式
  dump-server          启动 Laravel Var Dump Server
  env                  显示当前框架运行的环境
  help                 显示某个命令的帮助信息
  list                 显示所有可用的命令
  migrate              执行创建数据表的命令,而迁移文件则是由各个地方生成的
  optimize             优化框架性能,比如强制编译
  preset               Swap the front-end scaffolding for the application
  serve                启动内置服务器
  tinker               进入应用交互模式
  up                   退出维护模式
 app
  app:name             更改应用命名空间
 auth
  auth:clear-resets    清除过期的密码重置令牌
 cache
  cache:clear          清空应用缓存
  cache:forget         Remove an item from the cache
  cache:table          创建缓存数据库表 migration
 config
  config:cache         合并所有的配置信息为一个,提高加载速度
  config:clear         移除配置缓存文件
 db
  db:seed              运行所有的 seed 假数据生成类
 event
  event:generate       基于注册的信息,生成遗漏的 events 和 handlers
 key
  key:generate         生成应用的 key(会覆盖)
 make
  make:auth            Scaffold basic login and registration views and routes
  make:channel         Create a new channel class
  make:command         Create a new Artisan command
  make:controller      Create a new controller class
  make:event           Create a new event class
  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           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:seeder          Create a new seeder class
  make:test            Create a new test class
 migrate
  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
  notifications:table  Create a migration for the notifications table
 optimize
  optimize:clear       Remove the cached bootstrap files
 package
  package:discover     Rebuild the cached package manifest
 queue
  queue:failed         查看所有执行失败的队列任务
  queue:failed-table   为执行失败的数据表任务创建一个迁移
  queue:flush          清除所有执行失败的队列任务
  queue:forget         删除一个执行失败的队列任务
  queue:listen         监听指定的队列,功能已被queue:work取代
  queue:restart        在当前的队列任务执行完毕后, 重启队列的守护进程,目前的作用只是停止进程。
  queue:retry          对指定 id 的执行失败的队列任务进行重试(id: 失败队列任务的 ID)
  queue:table          为队列数据库表创建一个新的迁移
  queue:work           启动队列消费进程,可使用 --daemon 参数加入守护进程,但不推荐。
 route
  route:cache          生成路由缓存文件来提升路由效率
  route:clear          移除路由缓存文件
  route:list           显示已注册过的路由
 schedule
  schedule:finish      某个任务被调用完毕会自动调用这个命令
  schedule:run         运行计划任务调度,一般放在crontab
 session
  session:table        生成一个用来存储session的migration
 storage
  storage:link         Create a symbolic link from "public/storage" to "storage/app/public"
 vendor
  vendor:publish       从 vendor 的扩展包中发布任何可发布的资源
 view
  view:cache           编译应用下所有的Blade模板文件并缓存起来
  view:clear           清除Blade模板文件缓存
发布了412 篇原创文章 · 获赞 25 · 访问量 5万+

猜你喜欢

转载自blog.csdn.net/raoxiaoya/article/details/103845304
今日推荐