2016-07-21 22:01:57 +08:00
|
|
|
<?php
|
2016-08-28 10:05:21 +08:00
|
|
|
|
2016-07-21 22:01:57 +08:00
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| Application Routes
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
| Here is where you can register all of the routes for an application.
|
2016-08-28 10:05:21 +08:00
|
|
|
| It's a breeze. Simply tell Laravel the URIs it should respond to
|
|
|
|
| and give it the controller to call when that URI is requested.
|
2016-07-21 22:01:57 +08:00
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2016-09-24 22:45:54 +08:00
|
|
|
Route::get('/', 'HomeController@index');
|
|
|
|
Route::get('/index.php', 'HomeController@index');
|
|
|
|
|
|
|
|
Route::get('/locale/{lang}', 'HomeController@locale');
|
2016-09-14 23:27:02 +08:00
|
|
|
|
2016-07-21 22:01:57 +08:00
|
|
|
/**
|
|
|
|
* Auth
|
|
|
|
*/
|
2016-11-18 16:46:58 +08:00
|
|
|
Route::group(['prefix' => 'auth'], function ()
|
2016-07-21 22:01:57 +08:00
|
|
|
{
|
2016-11-18 16:46:58 +08:00
|
|
|
Route::group(['middleware' => 'guest'], function ()
|
2016-07-21 22:01:57 +08:00
|
|
|
{
|
2016-09-24 22:45:54 +08:00
|
|
|
Route::get ('/login', 'AuthController@login');
|
|
|
|
Route::get ('/register', 'AuthController@register');
|
|
|
|
Route::get ('/forgot', 'AuthController@forgot');
|
|
|
|
Route::get ('/reset', 'AuthController@reset');
|
2016-07-21 22:01:57 +08:00
|
|
|
});
|
|
|
|
|
2016-09-24 22:45:54 +08:00
|
|
|
Route::any('/logout', 'AuthController@logout');
|
|
|
|
Route::any('/captcha', 'AuthController@captcha');
|
2016-07-21 22:01:57 +08:00
|
|
|
|
2016-09-24 22:45:54 +08:00
|
|
|
Route::post('/login', 'AuthController@handleLogin');
|
|
|
|
Route::post('/register', 'AuthController@handleRegister');
|
|
|
|
Route::post('/forgot', 'AuthController@handleForgot');
|
2016-07-21 22:01:57 +08:00
|
|
|
|
2016-09-24 22:45:54 +08:00
|
|
|
Route::post('/reset', 'AuthController@handleReset');
|
2016-07-21 22:01:57 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
/**
|
|
|
|
* User Center
|
|
|
|
*/
|
2016-11-18 16:46:58 +08:00
|
|
|
Route::group(['middleware' => 'auth', 'prefix' => 'user'], function ()
|
2016-07-21 22:01:57 +08:00
|
|
|
{
|
2016-08-28 10:05:21 +08:00
|
|
|
Route::any ('', 'UserController@index');
|
2017-01-17 22:57:16 +08:00
|
|
|
Route::any ('/sign-in', 'UserController@signIn');
|
2016-07-21 22:01:57 +08:00
|
|
|
|
|
|
|
// Profile
|
|
|
|
Route::get ('/profile', 'UserController@profile');
|
|
|
|
Route::post('/profile', 'UserController@handleProfile');
|
|
|
|
Route::post('/profile/avatar', 'UserController@setAvatar');
|
|
|
|
|
|
|
|
// Player
|
2016-08-28 10:05:21 +08:00
|
|
|
Route::any ('/player', 'PlayerController@index');
|
2016-07-21 22:01:57 +08:00
|
|
|
Route::post('/player/add', 'PlayerController@add');
|
|
|
|
Route::post('/player/show', 'PlayerController@show');
|
|
|
|
Route::post('/player/preference', 'PlayerController@setPreference');
|
|
|
|
Route::post('/player/set', 'PlayerController@setTexture');
|
|
|
|
Route::post('/player/texture', 'PlayerController@changeTexture');
|
|
|
|
Route::post('/player/texture/clear', 'PlayerController@clearTexture');
|
|
|
|
Route::post('/player/rename', 'PlayerController@rename');
|
|
|
|
Route::post('/player/delete', 'PlayerController@delete');
|
|
|
|
|
|
|
|
// Closet
|
|
|
|
Route::get ('/closet', 'ClosetController@index');
|
2017-04-23 23:58:22 +08:00
|
|
|
Route::get ('/closet-data', 'ClosetController@getClosetData');
|
2016-07-21 22:01:57 +08:00
|
|
|
Route::post('/closet/add', 'ClosetController@add');
|
|
|
|
Route::post('/closet/remove', 'ClosetController@remove');
|
2016-09-25 10:35:16 +08:00
|
|
|
Route::post('/closet/rename', 'ClosetController@rename');
|
2016-07-21 22:01:57 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Skin Library
|
|
|
|
*/
|
2016-11-18 16:46:58 +08:00
|
|
|
Route::group(['prefix' => 'skinlib'], function ()
|
2016-07-21 22:01:57 +08:00
|
|
|
{
|
2017-06-30 10:33:41 +08:00
|
|
|
Route::get('', 'SkinlibController@index');
|
|
|
|
Route::any('/info/{tid}', 'SkinlibController@info');
|
|
|
|
Route::any('/show/{tid}', 'SkinlibController@show');
|
|
|
|
Route::any('/data', 'SkinlibController@getSkinlibFiltered');
|
2016-07-21 22:01:57 +08:00
|
|
|
|
2016-11-18 16:46:58 +08:00
|
|
|
Route::group(['middleware' => 'auth'], function ()
|
2016-07-21 22:01:57 +08:00
|
|
|
{
|
2016-09-24 22:45:54 +08:00
|
|
|
Route::get ('/upload', 'SkinlibController@upload');
|
|
|
|
Route::post('/upload', 'SkinlibController@handleUpload');
|
2016-07-21 22:01:57 +08:00
|
|
|
|
2016-09-24 22:45:54 +08:00
|
|
|
Route::post('/rename', 'SkinlibController@rename');
|
2017-01-22 15:45:10 +08:00
|
|
|
Route::post('/privacy', 'SkinlibController@privacy');
|
2016-09-24 22:45:54 +08:00
|
|
|
Route::post('/delete', 'SkinlibController@delete');
|
2016-07-21 22:01:57 +08:00
|
|
|
});
|
|
|
|
});
|
|
|
|
|
2016-07-22 19:36:24 +08:00
|
|
|
/**
|
|
|
|
* Admin Panel
|
|
|
|
*/
|
2016-11-18 16:46:58 +08:00
|
|
|
Route::group(['middleware' => 'admin', 'prefix' => 'admin'], function ()
|
2016-07-22 19:36:24 +08:00
|
|
|
{
|
2016-12-31 13:07:00 +08:00
|
|
|
Route::get('/', 'AdminController@index');
|
2016-07-22 19:36:24 +08:00
|
|
|
|
2016-12-31 13:07:00 +08:00
|
|
|
Route::any('/customize', 'AdminController@customize');
|
|
|
|
Route::any('/score', 'AdminController@score');
|
|
|
|
Route::any('/options', 'AdminController@options');
|
2016-11-25 12:54:20 +08:00
|
|
|
|
2016-12-31 13:07:00 +08:00
|
|
|
Route::get('/users', 'AdminController@users');
|
|
|
|
Route::get('/user-data', 'AdminController@getUserData');
|
|
|
|
|
|
|
|
Route::get('/players', 'AdminController@players');
|
|
|
|
Route::get('/player-data', 'AdminController@getPlayerData');
|
2017-04-26 15:28:53 +08:00
|
|
|
Route::get('/user/{uid}', 'AdminController@getOneUser');
|
2016-12-31 11:38:07 +08:00
|
|
|
|
2016-07-23 15:20:10 +08:00
|
|
|
// ajax handlers
|
2016-12-31 13:07:00 +08:00
|
|
|
Route::post('/users', 'AdminController@userAjaxHandler');
|
|
|
|
Route::post('/players', 'AdminController@playerAjaxHandler');
|
2016-12-17 19:52:59 +08:00
|
|
|
|
|
|
|
Route::group(['prefix' => 'plugins'], function () {
|
2017-01-17 21:41:20 +08:00
|
|
|
Route::get ('/data', 'PluginController@getPluginData');
|
|
|
|
Route::any ('/market', 'PluginController@showMarket');
|
|
|
|
|
|
|
|
Route::get ('/manage', 'PluginController@showManage');
|
|
|
|
Route::post('/manage', 'PluginController@manage');
|
|
|
|
Route::any ('/config/{name}', 'PluginController@config');
|
2016-12-17 19:52:59 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
Route::group(['prefix' => 'update'], function () {
|
2016-12-18 17:32:46 +08:00
|
|
|
Route::any('', 'UpdateController@showUpdatePage');
|
|
|
|
Route::get('/check', 'UpdateController@checkUpdates');
|
|
|
|
Route::any('/download', 'UpdateController@download');
|
2016-12-17 19:52:59 +08:00
|
|
|
});
|
2016-07-22 19:36:24 +08:00
|
|
|
});
|