Level 70
@birdietorerik Try using the paginate() method directly on the query builder.
For example:
public static function getroundsplayer($userid)
{
return Playersround::where('userref_id', $userid)
->select('playersrounds.*', 'tees.name as teename', 'golfclubs.name as golfclubname', 'courcegolfclubs.courcename', 'startlists.*')
->join('startlists', 'startlists.id', '=', 'playersrounds.startlist_id')
->join('tees', 'tees.id', '=', 'playersrounds.teeref_id')
->join('golfclubs', 'golfclubs.id', '=', 'playersrounds.golf_id')
->join('courcegolfclubs', 'courcegolfclubs.id', '=', 'playersrounds.sloyferef_id')
->paginate(2);
}
2 likes