Laravel Tip ๐Ÿ’ก

Need to know what changed on an Eloquent model?

Before saving, use isDirty() and isClean().

After saving, use wasChanged().

And when you need the previous value, getOriginal() has you covered.

The important part is knowing when to use each one. ๐Ÿ‘€
for more: github.com/MrPunyapal/tips
image

  • No matching results...
  • Searching...

/ 1000