浏览代码

Note > claims > order by created_at DESC

Vijayakrishnan 4 年之前
父节点
当前提交
d4790f867b
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/Models/Note.php

+ 1 - 1
app/Models/Note.php

@@ -58,7 +58,7 @@ class Note extends Model
 
     public function claims()
     {
-        return $this->hasMany(Claim::class, 'note_id', 'id');
+        return $this->hasMany(Claim::class, 'note_id', 'id')->orderBy('created_at', 'DESC');
     }
 
     public function summary()