⚡ Redirige l'utilisateur connecté
This commit is contained in:
parent
18dd6cd92d
commit
6f5f362bf9
@ -3,13 +3,22 @@
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
class WelcomeController extends Controller
|
||||
{
|
||||
/**
|
||||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector|\Illuminate\View\View
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
if (Auth::guest()) {
|
||||
return view('welcome', [
|
||||
'today' => new \DateTime(),
|
||||
]);
|
||||
}
|
||||
|
||||
return redirect(route('dashboard'));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user