diff --git a/app/Models/Turma.php b/app/Models/Turma.php index 6bdcfbb..1dcc15b 100644 --- a/app/Models/Turma.php +++ b/app/Models/Turma.php @@ -32,12 +32,12 @@ public function prazos() public function prazosOrdered() { - // THIS WILL ALWAYS BE ORDERED BY EX-NAME + // THIS WILL ALWAYS BE ORDERED BY PRAZO AND EX-NAME return $this->prazos() ->join('exercicios', 'prazos.exercicio_id', '=', 'exercicios.id') ->select('prazos.*','exercicios.name as exercicio_name') - ->orderBy('exercicio_name') ->orderBy('prazo') + ->orderBy('exercicio_name') ; } }