Pivot sorting with Laravel

You have Post and Collection class, and do the relationship collectables.
But we need to sort by added created time post to collection, but how to do that?

public function posts()
{
return $this->morphedByMany(Post::class, 'collectable')
->withTimestamps()
->latest('collectables.created_at');
}