I'm trying to get last 100 posts from database and than order them by likecount or another property and output only 5 of them, that way I will discover most liked 5 posts or viewed, or reported out of last 100 posts. What I tried so far is like below:

```
$lastHundredPost = Post::orderBy('id', 'desc')->take(100);
$post = $lastHundredPost->orderBy('likecount', 'desc')->take(2)->get();

```

this does not disable first `orderBy` property.

> 
> Laravel 5.4
> 
> 
>