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
.
There are four events listed at the official docs, but I think Laravel has more events than these four!
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
.
There are four events listed at the official docs, but I think Laravel has more events than these four!
拉威尔并不像你想象的那么多.虽然它确实利用了事件系统,但开发人员可以在这些应用程序中使用它.总之,这是我整理的 list .
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
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}
有另一个变体,其中包含正在更新的类名.
eloquent.{event}: {classname}
我不会说这绝对是一切,但它应该至少是99%.