- Adds new model methods

This commit is contained in:
Vlad
2016-08-17 21:14:04 -04:00
parent 42339927cf
commit e48d55f0b1
4 changed files with 48 additions and 0 deletions

View File

@ -5,4 +5,9 @@ if(!defined('ABSPATH')) exit;
class NewsletterLink extends Model {
public static $_table = MP_NEWSLETTER_LINKS_TABLE;
static function getByHash($hash) {
return parent::where('hash', $hash)
->findOne();
}
}