Skip to content

Commit

Permalink
order by id
Browse files Browse the repository at this point in the history
  • Loading branch information
QuentinGab committed Jan 12, 2024
1 parent 7569bf1 commit 09c3b56
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Traits/HasMedia.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ trait HasMedia
public function media(): MorphMany
{
return $this->morphMany(config('media.model'), 'model')
->orderByRaw('-order_column DESC');
->orderByRaw('-order_column DESC')
->orderBy('id', 'asc');
}

/**
Expand Down

0 comments on commit 09c3b56

Please sign in to comment.