Skip to content

Commit

Permalink
save last login timestamp at registration
Browse files Browse the repository at this point in the history
  • Loading branch information
MrKrisKrisu committed Jun 2, 2020
1 parent bfc0880 commit a27c1c4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/Http/Controllers/Auth/RegisterController.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use App\Http\Controllers\Controller;
use App\Providers\RouteServiceProvider;
use App\User;
use Carbon\Carbon;
use Illuminate\Foundation\Auth\RegistersUsers;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Validator;
Expand Down Expand Up @@ -44,7 +45,7 @@ public function __construct()
/**
* Get a validator for an incoming registration request.
*
* @param array $data
* @param array $data
* @return \Illuminate\Contracts\Validation\Validator
*/
protected function validator(array $data)
Expand All @@ -59,7 +60,7 @@ protected function validator(array $data)
/**
* Create a new user instance after a valid registration.
*
* @param array $data
* @param array $data
* @return \App\User
*/
protected function create(array $data)
Expand All @@ -68,6 +69,7 @@ protected function create(array $data)
'username' => $data['username'],
'email' => $data['email'],
'password' => Hash::make($data['password']),
'last_login' => Carbon::now()
]);
}
}

0 comments on commit a27c1c4

Please sign in to comment.