소스 검색

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()