Created
April 16, 2018 16:24
-
-
Save acacha/e30feaea31c941ceb9ae0572496f6638 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers; | |
use Auth; | |
use Illuminate\Http\Request; | |
/** | |
* Class LoggedUserController. | |
* | |
* @package App\Http\Controllers | |
*/ | |
class LoggedUserController extends Controller | |
{ | |
/** | |
* Update user. | |
* @param Request $request | |
* @return \App\User|null | |
*/ | |
public function update(Request $request) | |
{ | |
Auth::user()->update($request->only(['name','email'])); | |
return Auth::user(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment