App\Http\Controllers\Auth\LoginController::authenticated PHP Method

authenticated() public method

During the login process, call the GitHub API and grab the latest version of Canvas available and store it in the database. The functionality is kept here so that the API Rate Limit will be harder to reach.
public authenticated ( Illuminate\Http\Request $request, Canvas\Models\User $user ) : Illuminate\Http\RedirectResponse
$request Illuminate\Http\Request
$user Canvas\Models\User
return Illuminate\Http\RedirectResponse
    public function authenticated(Request $request, User $user)
    {
        $col = Settings::getByName('latest_release');
        empty($col) ? Settings::firstOrCreate(['setting_name' => 'latest_release', 'setting_value' => Helpers::getLatestRelease()]) : Settings::where('setting_name', 'latest_release')->update(['setting_value' => Helpers::getLatestRelease()]);
        Session::set('_login', trans('messages.login', ['display_name' => $user->display_name]));
        return redirect()->intended($this->redirectPath());
    }