Created
August 9, 2017 18:39
-
-
Save tomnagengast/f444cd4a1920e45805f4830141c76239 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
post.update(request().all()) | |
// Ability to detect if a certain attribute was changed after a model was updated | |
if (post.wasChanged('is_published') && post.is_published) { | |
Notification.send($subscriber, new NewPostNotification) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment