![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
laravel5学习笔记
zhangfangfang870905
这个作者很懒,什么都没留下…
展开
-
laravel5——事件
创建事件类:php artisan make:event TestEvent ,生成文件:app/Events/TestEvent.php 创建事件的处理程序:php artisan handler:event TestSum --event=TestEvent ,生成文件:vi app/Handlers/Events/TestSum.php 每次创建新事件时,需要执行上述两原创 2015-11-20 17:41:47 · 2178 阅读 · 0 评论 -
laravel5——command
使用场景:当需要处理复杂逻辑时,可将处理逻辑写入命令类中。 使用方法: 建立命令——php artisan make:command CommandTest 执行成功后会生成文件——app/Commands/CommandTest.php 调用命令——controller内调用dispatch方法,如$this->dispatch(new Comman原创 2015-11-23 14:21:17 · 2459 阅读 · 0 评论 -
laravel5——artisan开发
创建自定义命令:php artisan make:console ConsoleTest , 生成文件app/Console/commands/ConsoleTest.php php artisan make:console ConsoleTest --command=test:sum , 生成文件同上,只是php文件中的成员变量$name会被赋值为:test:s原创 2015-11-25 11:54:56 · 321 阅读 · 0 评论 -
laravel5中对pipeline的理解
原文地址:laravel5中对pipeline的理解 http://sheefeng.com/laravel5-pipeline/ pipeline在laravel中的应用 Router和ControllerDispatcher中都用到了pipeline结构,具体如下所示: router中的Pipeline: /** * Run the given route within转载 2015-12-21 15:01:05 · 2502 阅读 · 0 评论