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..