Files
piratepoet/lib/Models/NewsletterPost.php
Jan Jakeš e185121f43 Fix properties with trailing underscore
[MAILPOET-2715]
2020-02-19 19:12:53 +00:00

19 lines
450 B
PHP

<?php
namespace MailPoet\Models;
/**
* @property int $newsletterId
* @property int $postId
* @property string $updatedAt
*/
class NewsletterPost extends Model {
public static $_table = MP_NEWSLETTER_POSTS_TABLE; // phpcs:ignore PSR2.Classes.PropertyDeclaration
public static function getNewestNewsletterPost($newsletterId) {
return self::where('newsletter_id', $newsletterId)
->orderByDesc('created_at')
->findOne();
}
}