在哪里可以获得Laravel事件的完整列表(由核心库触发)? [英] Where can I get a complete list of Laravel events (fired by the core libraries)?

查看:51
本文介绍了在哪里可以获得Laravel事件的完整列表(由核心库触发)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道Laravel核心库触发了哪些事件.我想获取完整的列表,例如laravel.querylaravel.done.

I want to know what events are fired by Laravel core libraries. I want to get the complete list, such as laravel.query and laravel.done.

官方文档中列出了四个事件,但是我认为Laravel的事件比这四个事件更多!

There are four events listed at the official docs, but I think Laravel has more events than these four!

推荐答案

Laravel实际上不会触发您想的那样多的事件.尽管它确实使用了事件系统,但开发人员可以在其中使用应用程序.无论如何,这是我编制的清单.

Laravel doesn't actually fire as many events as you'd think. While it does make use of the Event system it's there for developers to use within there applications. Anyway, here's a list I compiled.

laravel.done
laravel.log
laravel.query
laravel.resolving
laravel.composing: {viewname}
laravel.started: {bundlename}
laravel.controller.factory
laravel.config.loader
laravel.language.loader
laravel.view.loader
laravel.view.engine

view.filter

eloquent.saving
eloquent.updated
eloquent.created
eloquent.saved
eloquent.deleting
eloquent.deleted
eloquent.booted: {$model}
eloquent.booting: {$model}


500
404

500404都是与错误相关的事件.这些设置在文件中,因此您可以查看默认的侦听器是什么.

The 500 and 404 are both error related events. These are set in the routes.php file so you can see what the default listener is.

我想指出的是,eloquent.{event}还有另一个变体,其中包含要更新的类名.

I'd like to point out that the eloquent.{event} have another variation containing the class name that is being updated.

eloquent.{event}: {classname}

我不会说这绝对是一切,但至少应占其99%.

I'm not going to say this is absolutely everything but it should be at least 99% of it.

这篇关于在哪里可以获得Laravel事件的完整列表(由核心库触发)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆