DEV Community

Ellis
Ellis

Posted on

2

Laravel Model Events & Observers Tutorial


Laravel Model events allow you to tap into various points in a model’s lifecycle, and can even prevent a save or delete from happening.

The model has the following events at the time of writing:

  • retrieved
  • creating
  • created
  • updating
  • updated
  • saving
  • saved
  • deleting
  • deleted
  • restoring
  • restored

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay