Question: How can i use the orderBy method with this script:

```
 public function getProposalByUser($userId)
{
    return ProposalModel::where('user_id', '=', $userId)->paginate(4)->orderBy('desc');
}

```

the script is to select the proposal where user have. and i want to arrange it for the top is newest. 
Thanks in advance, and sorry for my bad english..

Answer: 
Try this:

```
return ProposalModel::where('user_id', '=', $userId)->orderBy('user_id', 'desc')->paginate(4);

```
Try this:

```
return ProposalModel::where('user_id', '=', $userId)->orderBy('created_date', 'desc')->paginate(4);

```