App\Repositories\NewsItemRepository::findNext PHP Method

findNext() public static method

public static findNext ( NewsItem $newsItem ) : NewsItem | null
$newsItem app\models\NewsItem
return app\models\NewsItem | null
    public static function findNext(NewsItem $newsItem)
    {
        return NewsItem::online()->where('publish_date', '>', $newsItem->publish_date)->orderBy('publish_date', 'desc')->first();
    }