public function createBenisAccount($slackUsername) { $user = User::findBySlackName($slackUsername); if (!isset($user->slack_name)) { $benisSize = rand(80, 120); User::create(['slack_name' => $slackUsername, 'benis' => $benisSize]); $comment = "Biederer Durchschnitt"; if ($benisSize > 100) { $comment = "WOW!"; } if ($benisSize > 110) { $comment = "HOLLA DIE WALDFEE!"; } if ($benisSize < 90) { $comment = "Asiatisch?"; } return "@{$slackUsername} hat nun einen benis! Die grösse beträgt {$benisSize} - {$comment}"; } return "@{$slackUsername} hat bereits einen benis"; }
/** * Create a new user instance after a valid registration. * * @param array $data * @return User */ protected function create(array $data) { return User::create(['name' => $data['name'], 'email' => $data['email'], 'password' => bcrypt($data['password'])]); }