Created
January 4, 2016 10:45
-
-
Save vojtasvoboda/56d6bd003c3bf9d0d440 to your computer and use it in GitHub Desktop.
Listen on Eloquent events in OctoberCMS
This file contains hidden or 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
<?php | |
// ... | |
public function boot() | |
{ | |
// Event Listeners for RainLab Blog | |
Event::listen('eloquent.created: RainLab\Blog\Models\Post', function($model) { | |
// ... do something | |
}); | |
Event::listen('eloquent.saved: RainLab\Blog\Models\Post', function($model) { | |
// ... do something | |
}); | |
Event::listen('eloquent.deleted: RainLab\Blog\Models\Post', function($model) { | |
// ... do something | |
}); | |
// Event Listeners for SoBoRed settings | |
Event::listen('eloquent.saved: SoBoRed\Rss\Models\Settings', function($model) { | |
// ... do something | |
}); | |
} | |
// ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment