~/talk

Auditing Laravel

Talkat Laracon EU 2022 · 2022-04-26..04-27· [php, security]
slides:none on file

Shows a concrete audit implementation: a Singleton audit service collected via middleware and a terminate middleware to capture request/response after send, uses Laravel events (model retrieved, notification sent, mail message sent, gate evaluated) as inputs, measures request time via the LARAVEL_START constant, and persists JSON collections in the database so they cast back to collections. Demo code is runnable and claims it took ~30 minutes to build. Event-driven listeners handle the wiring.

AI-written summary · about

  1. 0:00Laravel auditing intro
  2. 1:13What is auditing
  3. 4:45Auditing use cases
  4. 5:06Middleware basics
  5. 7:51Terminate middleware
  6. 8:14Custom audit service
  7. 11:41Registering audit service
  8. 12:25Data via Laravel events
  9. 13:51Auditing models
  10. 15:17Auditing notifications
  11. 16:41Auditing policies
  12. 18:31Event listeners
  13. 19:13Request time in middleware
  14. 20:15Storing audit data
  15. 21:41Alternative auditing packages
  16. 23:08Extending auditing
  17. 23:49Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.