25 lines
555 B
PHP
25 lines
555 B
PHP
<?php
|
|
|
|
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'));
|
|
}
|
|
}
|