/** * Generate a Last Name * * Uses US Census data to get $max most popular names for both male and female and selects one at random * * Pool is only 250 most frequent last names. Increase by passing a higher value for $max * * @param int $max How large should our pool of names be? Default: 250 * @return string Last Name */ public function getLastName($max = 250) { return LastName::where('rank', '<=', $max)->orderByRaw(Database::random())->first()->name; }