nativegallery/app/Core/Routes.php

27 lines
404 B
PHP
Raw Normal View History

2024-07-04 12:04:41 +03:00
<?php
namespace App\Core;
use \App\Services\{Router, Auth, DB};
use \App\Core\{Page};
class Routes
{
public static function init()
{
Router::get('/', 'MainController@i');
2024-07-04 12:36:23 +03:00
Router::get('/photo/$id', 'PhotoController@i');
2024-07-04 12:04:41 +03:00
if (Auth::userid() > 0) {
2024-07-04 12:36:23 +03:00
2024-07-04 12:04:41 +03:00
} else {
2024-07-04 12:36:23 +03:00
//Router::redirect('/login?return='.$_SERVER['HTTP_REFERER']);
2024-07-04 12:04:41 +03:00
}
}
}