Project structure change
This commit is contained in:
parent
bd1642957c
commit
837f126021
29 changed files with 298 additions and 254 deletions
43
routes.php
Normal file
43
routes.php
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
<?php
|
||||
use App\Helpers\Misc;
|
||||
use App\Models\BaseTemplate;
|
||||
|
||||
$router->get('/', function () {
|
||||
$latte = Misc::latte();
|
||||
$latte->render(Misc::getView('home'), new BaseTemplate('Home'));
|
||||
});
|
||||
|
||||
$router->get('/about', function () {
|
||||
$latte = Misc::latte();
|
||||
$latte->render(Misc::getView('about'), new BaseTemplate('About'));
|
||||
});
|
||||
|
||||
$router->get('/stream', 'ProxyController@stream');
|
||||
|
||||
$router->mount('/trending', function () use ($router) {
|
||||
$router->get('/', 'TrendingController@get');
|
||||
$router->get('/rss', 'TrendingController@rss');
|
||||
});
|
||||
|
||||
$router->mount('/@([^/]+)', function () use ($router) {
|
||||
$router->get('/', 'UserController@get');
|
||||
$router->get('/rss', 'UserController@rss');
|
||||
});
|
||||
|
||||
$router->get('/video/(\w+)', 'VideoController@get');
|
||||
|
||||
$router->mount('/tag', function () use ($router) {
|
||||
$router->get('/([^/]+)', 'TagController@get');
|
||||
$router->get('/rss', 'TagController@rss');
|
||||
});
|
||||
|
||||
$router->get('/music/([^/]+)', 'MusicController@get');
|
||||
|
||||
// -- Settings -- //
|
||||
$router->mount('/settings', function () use ($router) {
|
||||
$router->get('/', 'SettingsController@index');
|
||||
$router->post('/proxy', 'SettingsController@proxy');
|
||||
$router->post('/following', 'SettingsController@following');
|
||||
});
|
||||
|
||||
$router->get('/following', 'FollowingController@get');
|
||||
Loading…
Add table
Add a link
Reference in a new issue