Fix caching issue for '/' route
This commit is contained in:
parent
6ed891fc04
commit
9232513831
|
@ -1,14 +1,11 @@
|
|||
<?php
|
||||
|
||||
use Engelsystem\Http\Exceptions\HttpTemporaryRedirect;
|
||||
use FastRoute\RouteCollector;
|
||||
|
||||
/** @var RouteCollector $route */
|
||||
|
||||
// Pages
|
||||
$route->get('/', function () {
|
||||
throw new HttpTemporaryRedirect(auth()->user() ? config('home_site') : 'login');
|
||||
});
|
||||
$route->get('/', 'HomeController@index');
|
||||
$route->get('/credits', 'CreditsController@index');
|
||||
|
||||
// Authentication
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
|
||||
namespace Engelsystem\Controllers;
|
||||
|
||||
use Engelsystem\Http\Exceptions\HttpTemporaryRedirect;
|
||||
|
||||
class HomeController extends BaseController
|
||||
{
|
||||
/**
|
||||
* @throws HttpTemporaryRedirect
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
throw new HttpTemporaryRedirect(auth()->user() ? config('home_site') : 'login');
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue