Commit c9c0380b authored by Taylor Otwell's avatar Taylor Otwell

Just use helper function in middleware.

parent 055edad2
......@@ -2,7 +2,6 @@
use Closure;
use Illuminate\Contracts\Auth\Guard;
use Illuminate\Http\RedirectResponse;
class RedirectIfAuthenticated
{
......@@ -35,7 +34,7 @@ class RedirectIfAuthenticated
public function handle($request, Closure $next)
{
if ($this->auth->check()) {
return new RedirectResponse(url('/home'));
return redirect('/home');
}
return $next($request);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment