Update
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
use App;
|
||||
use App\Models\User;
|
||||
use App\Models\UserPlan;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Laravel\Socialite\Facades\Socialite;
|
||||
|
||||
@@ -60,7 +61,7 @@ public function handleGoogleCallback()
|
||||
}
|
||||
}
|
||||
|
||||
return redirect()->intended(route('home'));
|
||||
return redirect()->intended(route('home'))->with('success', "You're now logged in!");
|
||||
} catch (\Exception $e) {
|
||||
|
||||
throw $e;
|
||||
@@ -73,7 +74,17 @@ public function handleGoogleCallback()
|
||||
}
|
||||
}
|
||||
|
||||
private function setupUser($user) {}
|
||||
private function setupUser($user)
|
||||
{
|
||||
$user_plan = UserPlan::where('user_id', $user->id)->first();
|
||||
|
||||
if (!$user_plan) {
|
||||
$user_plan = UserPlan::create([
|
||||
'user_id' => $user->id,
|
||||
'plan_id' => 'free',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
private function getMockGoogleUser()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user