Skip to content

Instantly share code, notes, and snippets.

@ovicko
Last active May 19, 2021 10:04
Show Gist options
  • Save ovicko/b4f8d94a63394fbe7de22d1aad24019b to your computer and use it in GitHub Desktop.
Save ovicko/b4f8d94a63394fbe7de22d1aad24019b to your computer and use it in GitHub Desktop.
Create a constant that will identify the event in your ActiveRecord class.
<?php
class Records extends \yii\db\ActiveRecord
{
//create the event name
const EVENT_SEND_EMAIL_UPDATE = ‘send-email-to-users’;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment