blessing-skin-server/app/Http/Routes/web.php

130 lines
4.8 KiB
PHP
Raw Normal View History

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
|
*/
Route::get('/', 'HomeController@index');
Route::get('/index.php', 'HomeController@index');
Route::get('/locale/{lang}', 'HomeController@locale');
2016-07-21 22:01:57 +08:00
/**
* Auth
*/
Route::group(['prefix' => 'auth'], function ()
2016-07-21 22:01:57 +08:00
{
Route::group(['middleware' => 'guest'], function ()
2016-07-21 22:01:57 +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
});
Route::any('/logout', 'AuthController@logout');
Route::any('/captcha', 'AuthController@captcha');
2016-07-21 22:01:57 +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
Route::post('/reset', 'AuthController@handleReset');
2016-07-21 22:01:57 +08:00
});
/**
* User Center
*/
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');
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');
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
*/
Route::group(['prefix' => 'skinlib'], function ()
2016-07-21 22:01:57 +08:00
{
Route::get ('', 'SkinlibController@index');
Route::any ('/info/{tid}', 'SkinlibController@info');
Route::any ('/show', 'SkinlibController@show');
Route::any ('/search', 'SkinlibController@search');
2016-07-21 22:01:57 +08:00
Route::group(['middleware' => 'auth'], function ()
2016-07-21 22:01:57 +08:00
{
Route::get ('/upload', 'SkinlibController@upload');
Route::post('/upload', 'SkinlibController@handleUpload');
2016-07-21 22:01:57 +08:00
Route::post('/rename', 'SkinlibController@rename');
Route::post('/privacy/{tid}', 'SkinlibController@privacy');
Route::post('/delete', 'SkinlibController@delete');
2016-07-21 22:01:57 +08:00
});
});
2016-07-22 19:36:24 +08:00
/**
* Admin Panel
*/
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-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');
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 () {
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
});