继续浏览精彩内容
慕课网APP
程序员的梦工厂
打开
继续
感谢您的支持,我会继续努力的
赞赏金额会直接到老师账户
将二维码发送给自己后长按识别
微信支付
支付宝支付

Laravel命令解析

holdtom
关注TA
已关注
手记 1703
粉丝 240
获赞 991


php artisan list make

---------------------------9

storage 一些缓存

routers 四类路由

resources 模板等未编译的前端文件

public 项目入口文件

bootstrap 框架载入文件

configapp所有配置

database数据库迁移目录

make:migration Create a new migration file

tests 测试文件夹

make:test Create a new test class

make:seeder Create a new seeder class Laravel 可以用 seed 类轻松地为数据库填充测试数据。

app

app目录

Models

make:model Create a new Eloquent model class 

php artisan make:model Models/Test

Services 

业务逻辑

make:factory Create a new model factory

make:observer Create a new observer class

make:policy Create a new policy class

Broadcasting

目录包含了应用所需的所有广播频道类

该目录默认不存在

make:channel Create a new channel class

Console目录

目录包含应用所有自定义的 Artisan 命令

make:command Create a new Artisan command

Events目录

event:generate 和 make:event 

该目录用于存放事件类

make:event Create a new event class

Exceptions目录

Exceptions 目录包含应用的异常处理器

自定义异常如何记录或渲染,需要编辑该目录下的 Handler 类

make:exception Create a new custom exception class

Http目录

Http 目录包含了控制器、中间件以及表单请求等,几乎所有通过 Web 进入应用的请求处理都在这里进行。

make:request Create a new form request class app/Http/Requests 目录下

make:controller Create a new controller class app/Http/Controllers 目录下

make:resource Create a new resource 创建一个资源转化器 app/Http/Resources 目录下

make:auth Scaffold basic login and registration views and routes app/Http/Controllers 目录下 HomeController.php和一系列模板

make:middleware Create a new middleware class app/Http/Middleware 目录下

Jobs目录

目录用于存放队列任务

该目录默认不存在

make:job Create a new job class

Listeners目录

event:generate 和 make:listener

这个目录默认不存在

目录包含处理事件的类(事件监听器)

make:listener Create a new event listener class

Mail目录

这个目录默认不存在

目录包含应用所有邮件相关类

make:mail Create a new email class

Notifications目录

Notifications 目录包含应用发送的所有通知

这个目录默认不存在,

make:notification Create a new notification class

Policies目录

这个目录默认不存在 

目录包含了应用所有的授权策略类

make:policy

Providers目录

目录包含应用的所有服务提供者。

make:provider Create a new service provider class

Rules目录

目录包含应用的自定义验证规则对象

该目录默认不存在

make:rule Create a new validation rule

©著作权归作者所有:来自51CTO博客作者wz669的原创作品,如需转载,请注明出处,否则将追究法律责任


打开App,阅读手记
0人推荐
发表评论
随时随地看视频慕课网APP