コード例 #1
0
ファイル: ProfileController.php プロジェクト: kolimpri/auth
 /**
  * Update the user's profile information.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function updateUserProfile(Request $request)
 {
     $this->validateUserProfile($request);
     if (kAuth::$updateProfilesWith) {
         $this->callCustomUpdater(kAuth::$updateProfilesWith, $request);
     } else {
         Auth::user()->fill($request->all())->save();
     }
     event(new ProfileUpdated(Auth::user()));
     return $this->users->getCurrentUser();
 }
コード例 #2
0
ファイル: AuthController.php プロジェクト: kolimpri/auth
 /**
  * Handle a registration request for the application.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 protected function register(Request $request)
 {
     $this->validateRegistration($request);
     $user = $this->users->createUserFromRegistrationRequest($request);
     if ($request->team_name) {
         $team = $this->teams->create($user, ['name' => $request->team_name]);
         event(new TeamCreated($team));
     }
     if ($request->invitation) {
         $this->teams->attachUserToTeamByInvitation($request->invitation, $user);
     }
     event(new Registered($user));
     Auth::login($user);
     return redirect()->intended($this->redirectPath());
 }
コード例 #3
0
ファイル: UserController.php プロジェクト: kolimpri/auth
 /**
  * Get the current user of the application.
  *
  * @return \Illuminate\Http\Response
  */
 public function getCurrentUser()
 {
     return $this->users->getCurrentUser();
 }