The limit is used to get limit data.limit data is done in two ways. asc and desc
Limit Query Orderby desc
$users = DB::table('usersprofile')->Orderby('id', 'desc')->limit(5)->get();
Limit Query Orderby asc
$users = DB::table('usersprofile')->Orderby('id', 'asc')->limit(5)->get();