Created
October 31, 2017 13:15
-
-
Save lukevers/16e3f81109bd30811d37d2b363e67e78 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 | |
public function handle($request, Closure $next) | |
{ | |
if ( | |
Auth::check() | |
&& empty(Auth::user()->onboarded_at) | |
&& ! $request->is('welcome') | |
&& ! $request->is('i/*') | |
&& ! $request->is('logout') | |
) { | |
$user = Auth::user(); | |
$user->onboarded_at = \Carbon\Carbon::now(); | |
$user->save(); | |
return redirect('/welcome'); | |
} | |
return $next($request); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment