mirror of
https://github.com/WerySkok/nativegallery.git
synced 2024-12-23 09:01:03 +03:00
26 lines
358 B
PHP
26 lines
358 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Core;
|
||
|
|
||
|
use \App\Services\{Router, Auth, DB};
|
||
|
use \App\Core\{Page};
|
||
|
|
||
|
|
||
|
|
||
|
class Routes
|
||
|
{
|
||
|
public static function init()
|
||
|
{
|
||
|
Router::get('/', 'MainController@i');
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
if (Auth::userid() > 0) {
|
||
|
|
||
|
} else {
|
||
|
Router::redirect('/login?return='.$_SERVER['HTTP_REFERER']);
|
||
|
}
|
||
|
}
|
||
|
}
|