Files
piratepoet/lib/Models/NewsletterPost.php
2016-08-04 18:17:49 +03:00

15 lines
331 B
PHP

<?php
namespace MailPoet\Models;
if(!defined('ABSPATH')) exit;
class NewsletterPost extends Model {
public static $_table = MP_NEWSLETTER_POSTS_TABLE;
static function getNewestNewsletterPost($newsletter_id) {
return self::where('newsletter_id', $newsletter_id)
->orderByDesc('created_at')
->findOne();
}
}