I have a model in which I am sorting items
public static function getArticleBlocks() {
return ArticleBlock::orderBy('order', 'ASC')->get();
}
This model has a parent Article
where I output the data with the ArticleBlock
data
public static function getArticle($id) {
return Article::where('id', $id)->with(['blog_categories', 'article_recommendations', 'article_blocks', 'article_comments'])->first();
}
How can I make the same sorting of article_blocks
when get Article
?