laravel中有没有类似thinkphp中行为绑定的东西?

WBOY
Release: 2016-06-06 20:06:43
Original
1064 people have browsed it

laravel中有没有类似thinkphp中行为绑定的东西?
如:
thinkphp中tag.php文件中
return array(

<code>    'app_begin'=>array('Test'), // 在app_begin 标签位添加Test行为
    'app_end'=>array('Test'), // 在app_end 标签位添加Test行为
);

</code>
Copy after login
Copy after login

各位laravel大神求指点

回复内容:

laravel中有没有类似thinkphp中行为绑定的东西?
如:
thinkphp中tag.php文件中
return array(

<code>    'app_begin'=>array('Test'), // 在app_begin 标签位添加Test行为
    'app_end'=>array('Test'), // 在app_end 标签位添加Test行为
);

</code>
Copy after login
Copy after login

各位laravel大神求指点

Laravel有个EventServiceProvider和对应的Facade,可以实现ThinkPHPHook一样的效果,不过Laravel中默认没有插入任何事件点,需要手动定义事件点。

laravel有中间件,你读下文档

http://www.golaravel.com/laravel/docs/5.1/middleware/

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template