Просмотр исходного кода

Sort by is_open - open ones first

Vijayakrishnan 4 лет назад
Родитель
Сommit
0736617853
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      app/Models/Client.php

+ 1 - 0
app/Models/Client.php

@@ -283,6 +283,7 @@ class Client extends Model
     public function tickets()
     {
         return $this->hasMany(Ticket::class, 'client_id', 'id')
+            ->orderBy('is_open', 'desc')
             ->orderBy('created_at', 'desc');
     }