2021-04-16 01:00:00 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Illuminate\Support\Facades\Route;
|
|
|
|
|
|
|
|
use App\Http\Controllers\AdminController;
|
|
|
|
use App\Http\Controllers\UserController;
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| Web Routes
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
| Here is where you can register web routes for your application. These
|
|
|
|
| routes are loaded by the RouteServiceProvider within a group which
|
|
|
|
| contains the "web" middleware group. Now create something great!
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2022-03-24 14:44:33 +01:00
|
|
|
//Changes the homepage to a LittleLink Custom profile if set in the config
|
|
|
|
if(env('HOME_URL') != '') {
|
|
|
|
Route::get('/', [UserController::class, 'littlelinkhome'])->name('littlelink');
|
|
|
|
Route::get('/home', [App\Http\Controllers\HomeController::class, 'home'])->name('home');
|
|
|
|
} else {
|
|
|
|
Route::get('/', [App\Http\Controllers\HomeController::class, 'home'])->name('home');
|
|
|
|
}
|
|
|
|
|
2022-03-19 18:34:43 +01:00
|
|
|
//Redirect if no page URL is set
|
|
|
|
Route::get('/@', function () {
|
|
|
|
return redirect('/studio/no_page_name');
|
|
|
|
});
|
|
|
|
|
2022-04-20 17:31:38 +02:00
|
|
|
//Show diagnose page
|
|
|
|
Route::get('/panel/diagnose', function () {
|
|
|
|
return view('panel/diagnose', []);
|
|
|
|
});
|
|
|
|
|
2021-04-16 01:00:00 +02:00
|
|
|
//Public route
|
|
|
|
Route::get('/going/{id?}/{link?}', [UserController::class, 'clickNumber'])->where('link', '.*')->name('clickNumber');
|
|
|
|
Route::get('/+{littlelink}', [UserController::class, 'littlelink'])->name('littlelink');
|
2021-07-06 10:56:05 +02:00
|
|
|
Route::get('/@{littlelink}', [UserController::class, 'littlelink'])->name('littlelink');
|
2021-04-16 01:00:00 +02:00
|
|
|
Route::get('/pages/{name}', [AdminController::class, 'pages'])->name('pages');
|
|
|
|
|
|
|
|
//User route
|
|
|
|
Route::group([
|
2022-03-19 16:48:21 +01:00
|
|
|
'middleware' => env('REGISTER_AUTH'),
|
2021-04-16 01:00:00 +02:00
|
|
|
], function () {
|
2021-07-06 10:56:05 +02:00
|
|
|
URL::forceScheme('https'); # comment to disable https
|
2021-04-16 01:00:00 +02:00
|
|
|
Route::get('/studio/index', [UserController::class, 'index'])->name('studioIndex');
|
|
|
|
Route::get('/studio/add-link', [UserController::class, 'showButtons'])->name('showButtons');
|
|
|
|
Route::post('/studio/add-link', [UserController::class, 'addLink'])->name('addLink');
|
|
|
|
Route::get('/studio/links', [UserController::class, 'showLinks'])->name('showLinks');
|
|
|
|
Route::get('/deleteLink/{id}', [UserController::class, 'deleteLink'])->name('deleteLink');
|
|
|
|
Route::get('/upLink/{up}/{id}', [UserController::class, 'upLink'])->name('upLink');
|
|
|
|
Route::get('/studio/edit-link/{id}', [UserController::class, 'showLink'])->name('showLink');
|
|
|
|
Route::post('/studio/edit-link/{id}', [UserController::class, 'editLink'])->name('editLink');
|
|
|
|
Route::get('/studio/page', [UserController::class, 'showPage'])->name('showPage');
|
2022-03-19 18:34:43 +01:00
|
|
|
Route::get('/studio/no_page_name', [UserController::class, 'showPage'])->name('showPage');
|
2021-04-16 01:00:00 +02:00
|
|
|
Route::post('/studio/page', [UserController::class, 'editPage'])->name('editPage');
|
|
|
|
Route::get('/studio/profile', [UserController::class, 'showProfile'])->name('showProfile');
|
|
|
|
Route::post('/studio/profile', [UserController::class, 'editProfile'])->name('editProfile');
|
|
|
|
});
|
|
|
|
|
|
|
|
//Admin route
|
|
|
|
Route::group([
|
|
|
|
'middleware' => 'admin',
|
|
|
|
], function () {
|
2021-07-06 10:56:05 +02:00
|
|
|
URL::forceScheme('https'); # comment to disable https
|
2021-04-16 01:00:00 +02:00
|
|
|
Route::get('/panel/index', [AdminController::class, 'index'])->name('panelIndex');
|
|
|
|
Route::get('/panel/users/{type}', [AdminController::class, 'users'])->name('showUsers');
|
|
|
|
Route::post('/panel/users/{name?}', [AdminController::class, 'searchUser'])->name('searchUser');
|
|
|
|
Route::get('/panel/users/block/{block}/{id}', [AdminController::class, 'blockUser'])->name('blockUser');
|
|
|
|
Route::get('/panel/edit-user/{id}', [AdminController::class, 'showUser'])->name('showUser');
|
|
|
|
Route::post('/panel/edit-user/{id}', [AdminController::class, 'editUser'])->name('editUser');
|
|
|
|
Route::get('/panel/pages', [AdminController::class, 'showSitePage'])->name('showSitePage');
|
|
|
|
Route::post('/panel/pages', [AdminController::class, 'editSitePage'])->name('editSitePage');
|
|
|
|
Route::get('/panel/site', [AdminController::class, 'showSite'])->name('showSite');
|
|
|
|
Route::post('/panel/site', [AdminController::class, 'editSite'])->name('editSite');
|
2022-03-28 12:20:47 +02:00
|
|
|
Route::get('/panel/phpinfo', [AdminController::class, 'phpinfo'])->name('phpinfo');
|
2021-04-16 01:00:00 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
require __DIR__.'/auth.php';
|