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
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2019-03-02 22:58:37 +08:00
|
|
|
Route::get('/', 'HomeController@index');
|
|
|
|
Route::get('/index.php', 'HomeController@index');
|
2016-09-24 22:45:54 +08:00
|
|
|
|
|
|
|
Route::get('/locale/{lang}', 'HomeController@locale');
|
2016-09-14 23:27:02 +08:00
|
|
|
|
2019-03-02 22:58:37 +08:00
|
|
|
/*
|
2016-07-21 22:01:57 +08:00
|
|
|
* Auth
|
|
|
|
*/
|
2019-03-02 22:58:37 +08:00
|
|
|
Route::group(['prefix' => 'auth'], function () {
|
|
|
|
Route::group(['middleware' => 'guest'], function () {
|
|
|
|
Route::view('/login', 'auth.login');
|
|
|
|
Route::get('/register', 'AuthController@register');
|
|
|
|
Route::get('/forgot', 'AuthController@forgot');
|
|
|
|
Route::get('/reset/{uid}', 'AuthController@reset')->name('auth.reset')->middleware('signed');
|
2016-07-21 22:01:57 +08:00
|
|
|
});
|
|
|
|
|
2019-03-02 22:58:37 +08:00
|
|
|
Route::any('/logout', 'AuthController@logout');
|
|
|
|
Route::any('/captcha', '\Mews\Captcha\CaptchaController@getCaptcha');
|
2016-07-21 22:01:57 +08:00
|
|
|
|
2019-03-02 22:58:37 +08:00
|
|
|
Route::post('/login', 'AuthController@handleLogin');
|
|
|
|
Route::post('/register', 'AuthController@handleRegister');
|
|
|
|
Route::post('/forgot', 'AuthController@handleForgot');
|
|
|
|
Route::post('/reset/{uid}', 'AuthController@handleReset')->middleware('signed');
|
2018-08-17 12:32:44 +08:00
|
|
|
|
2019-03-02 22:58:37 +08:00
|
|
|
Route::get('/verify/{uid}', 'AuthController@verify')->name('auth.verify')->middleware('signed');
|
2016-07-21 22:01:57 +08:00
|
|
|
});
|
|
|
|
|
2019-03-02 22:58:37 +08:00
|
|
|
/*
|
2016-07-21 22:01:57 +08:00
|
|
|
* User Center
|
|
|
|
*/
|
2019-03-02 22:58:37 +08:00
|
|
|
Route::group(['middleware' => ['web', 'auth'], 'prefix' => 'user'], function () {
|
|
|
|
Route::any('', 'UserController@index');
|
|
|
|
Route::get('/score-info', 'UserController@scoreInfo');
|
|
|
|
Route::post('/sign', 'UserController@sign');
|
2016-07-21 22:01:57 +08:00
|
|
|
|
|
|
|
// Profile
|
2019-03-02 22:58:37 +08:00
|
|
|
Route::get('/profile', 'UserController@profile');
|
|
|
|
Route::post('/profile', 'UserController@handleProfile');
|
|
|
|
Route::post('/profile/avatar', 'UserController@setAvatar');
|
2016-07-21 22:01:57 +08:00
|
|
|
|
2018-08-17 12:32:44 +08:00
|
|
|
// Email Verification
|
2019-03-02 22:58:37 +08:00
|
|
|
Route::post('/email-verification', 'UserController@sendVerificationEmail');
|
2018-08-17 12:32:44 +08:00
|
|
|
|
2016-07-21 22:01:57 +08:00
|
|
|
// Player
|
2018-08-17 12:32:44 +08:00
|
|
|
Route::group(['prefix' => 'player', 'middleware' => 'verified'], function () {
|
2019-03-02 22:58:37 +08:00
|
|
|
Route::any('', 'PlayerController@index');
|
|
|
|
Route::get('/list', 'PlayerController@listAll');
|
|
|
|
Route::post('/add', 'PlayerController@add');
|
|
|
|
Route::any('/show', 'PlayerController@show');
|
|
|
|
Route::post('/set', 'PlayerController@setTexture');
|
2018-08-17 12:32:44 +08:00
|
|
|
Route::post('/texture/clear', 'PlayerController@clearTexture');
|
2019-03-02 22:58:37 +08:00
|
|
|
Route::post('/rename', 'PlayerController@rename');
|
|
|
|
Route::post('/delete', 'PlayerController@delete');
|
2018-08-17 12:32:44 +08:00
|
|
|
});
|
2016-07-21 22:01:57 +08:00
|
|
|
|
|
|
|
// Closet
|
2019-03-02 22:58:37 +08:00
|
|
|
Route::get('/closet', 'ClosetController@index');
|
|
|
|
Route::get('/closet-data', 'ClosetController@getClosetData');
|
|
|
|
Route::post('/closet/add', 'ClosetController@add');
|
|
|
|
Route::post('/closet/remove', 'ClosetController@remove');
|
|
|
|
Route::post('/closet/rename', 'ClosetController@rename');
|
2016-07-21 22:01:57 +08:00
|
|
|
});
|
|
|
|
|
2019-03-02 22:58:37 +08:00
|
|
|
/*
|
2016-07-21 22:01:57 +08:00
|
|
|
* Skin Library
|
|
|
|
*/
|
2019-03-02 22:58:37 +08:00
|
|
|
Route::group(['prefix' => 'skinlib'], function () {
|
|
|
|
Route::get('', 'SkinlibController@index');
|
|
|
|
Route::any('/info/{tid}', 'SkinlibController@info');
|
|
|
|
Route::any('/show/{tid}', 'SkinlibController@show');
|
|
|
|
Route::any('/data', 'SkinlibController@getSkinlibFiltered');
|
|
|
|
|
|
|
|
Route::group(['middleware' => ['auth', 'verified']], function () {
|
|
|
|
Route::get('/upload', 'SkinlibController@upload');
|
|
|
|
Route::post('/upload', 'SkinlibController@handleUpload');
|
|
|
|
Route::post('/model', 'SkinlibController@model');
|
|
|
|
Route::post('/rename', 'SkinlibController@rename');
|
|
|
|
Route::post('/privacy', 'SkinlibController@privacy');
|
|
|
|
Route::post('/delete', 'SkinlibController@delete');
|
2016-07-21 22:01:57 +08:00
|
|
|
});
|
|
|
|
});
|
|
|
|
|
2019-03-02 22:58:37 +08:00
|
|
|
/*
|
2016-07-22 19:36:24 +08:00
|
|
|
* Admin Panel
|
|
|
|
*/
|
2019-03-02 22:58:37 +08:00
|
|
|
Route::group(['middleware' => ['auth', 'admin'], 'prefix' => 'admin'], function () {
|
|
|
|
Route::get('/', 'AdminController@index');
|
2016-07-22 19:36:24 +08:00
|
|
|
|
2019-03-02 22:58:37 +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
|
|
|
|
2019-03-02 22:58:37 +08:00
|
|
|
Route::view('/users', 'admin.users');
|
|
|
|
Route::any('/user-data', 'AdminController@getUserData');
|
2016-12-31 13:07:00 +08:00
|
|
|
|
2019-03-02 22:58:37 +08:00
|
|
|
Route::view('/players', 'admin.players');
|
|
|
|
Route::any('/player-data', 'AdminController@getPlayerData');
|
|
|
|
Route::get('/user/{uid}', 'AdminController@getOneUser');
|
2016-12-31 11:38:07 +08:00
|
|
|
|
2016-07-23 15:20:10 +08:00
|
|
|
// ajax handlers
|
2019-03-02 22:58:37 +08:00
|
|
|
Route::post('/users', 'AdminController@userAjaxHandler');
|
|
|
|
Route::post('/players', 'AdminController@playerAjaxHandler');
|
2016-12-17 19:52:59 +08:00
|
|
|
|
2018-08-21 09:05:29 +08:00
|
|
|
Route::group(['prefix' => 'plugins', 'middleware' => 'super-admin'], function () {
|
2019-03-02 22:58:37 +08:00
|
|
|
Route::get('/data', 'PluginController@getPluginData');
|
2017-01-17 21:41:20 +08:00
|
|
|
|
2018-07-17 17:17:31 +08:00
|
|
|
Route::view('/manage', 'admin.plugins');
|
2017-01-17 21:41:20 +08:00
|
|
|
Route::post('/manage', 'PluginController@manage');
|
2019-03-02 22:58:37 +08:00
|
|
|
Route::any('/config/{name}', 'PluginController@config');
|
2018-08-19 11:39:14 +08:00
|
|
|
|
|
|
|
Route::view('/market', 'admin.market');
|
2019-03-02 22:58:37 +08:00
|
|
|
Route::get('/market-data', 'MarketController@marketData');
|
|
|
|
Route::get('/market/check', 'MarketController@checkUpdates');
|
2018-08-19 11:39:14 +08:00
|
|
|
Route::post('/market/download', 'MarketController@download');
|
2016-12-17 19:52:59 +08:00
|
|
|
});
|
|
|
|
|
2018-08-21 09:05:29 +08:00
|
|
|
Route::group(['prefix' => 'update', 'middleware' => 'super-admin'], function () {
|
2019-03-02 22:58:37 +08:00
|
|
|
Route::any('', 'UpdateController@showUpdatePage');
|
|
|
|
Route::get('/check', 'UpdateController@checkUpdates');
|
2016-12-18 17:32:46 +08:00
|
|
|
Route::any('/download', 'UpdateController@download');
|
2016-12-17 19:52:59 +08:00
|
|
|
});
|
2016-07-22 19:36:24 +08:00
|
|
|
});
|