Put welcome message on homepage

This commit is contained in:
Ben Ramey
2017-11-04 19:26:08 -06:00
parent 7a962120c2
commit a17d950c1b
3 changed files with 16 additions and 6 deletions

View File

@@ -14,6 +14,7 @@ class HomeController extends Controller
*/
public function __construct()
{
$this->middleware('guest');
}
/**
@@ -23,10 +24,6 @@ class HomeController extends Controller
*/
public function index()
{
if (Auth::check()) {
return redirect()->route('dashboard');
}
return redirect()->route('login');
return view('home');
}
}

View File

@@ -18,7 +18,7 @@ class RedirectIfAuthenticated
public function handle($request, Closure $next, $guard = null)
{
if (Auth::guard($guard)->check()) {
return redirect('/home');
return redirect()->route('dashboard');
}
return $next($request);

View File

@@ -0,0 +1,13 @@
@extends('layouts.app')
@section('content')
<div class="jumbotron">
<h1>Welcome to Emmaus Grader!</h1>
<p>
Please log in to begin using the application.
</p>
<p><a class="btn btn-primary btn-lg" href="{{ route('login') }}" role="button">Login</a></p>
</div>
@endsection