-1
public function totalArticles(){
return $this->updates()->count() + $this->events()->count();
}}
Hier ist mein Modell und ich möchte bestellen bestellen Sie für dieses Formular min bis max bestellen.Wie man orderBy in Beziehung Laravel verwendet?
$ result = Model_Name :: orderBy ('id', 'ASC') -> get(); – JYoThI
public function totalArticles() { Rückgabe $ this-> hasMany ('.....') -> orderBy ('tablename.columnname'); } – user3663
Mögliches Duplikat von https://stackoverflow.com/questions/18143061/laravel-orderby-on-a-relationship –