41 lines
2.1 KiB
PHP
41 lines
2.1 KiB
PHP
<?php
|
|
|
|
use Illuminate\Support\Facades\Route;
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| 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!
|
|
|
|
|
*/
|
|
|
|
Route::get('/', function () {
|
|
return redirect("/login");
|
|
});
|
|
|
|
Route::get("/login", [\App\Http\Controllers\PublicController::class, "loginView"]);
|
|
Route::post("/login", [\App\Http\Controllers\PublicController::class, "login"]);
|
|
Route::get("/register", [\App\Http\Controllers\PublicController::class, "registerView"]);
|
|
Route::post("/register", [\App\Http\Controllers\PublicController::class, "register"]);
|
|
|
|
Route::middleware([\App\Http\Middleware\AuthMiddleware::class, \App\Http\Middleware\GUIMiddleware::class])->group(function () {
|
|
Route::get('/dashboard', [\App\Http\Controllers\DashboardController::class, "dashboardView"]);
|
|
|
|
Route::get("/vpn", [\App\Http\Controllers\VPNController::class, "overview"]);
|
|
Route::get("/vpn/access", [\App\Http\Controllers\VPNController::class, "accessView"]);
|
|
Route::post("/vpn/access", [\App\Http\Controllers\VPNController::class, "setAccess"]);
|
|
Route::get("/vpn/new", [\App\Http\Controllers\VPNController::class, "newView"]);
|
|
Route::post("/vpn/new", [\App\Http\Controllers\VPNController::class, "new"]);
|
|
Route::get("/vpn/sendToServer", [\App\Http\Controllers\VPNController::class, "sendToRest"]);
|
|
Route::get("/vpn/peer", [\App\Http\Controllers\PeerController::class, "overview"]);
|
|
Route::get("/vpn/peer/new", [\App\Http\Controllers\PeerController::class, "newView"]);
|
|
Route::post("/vpn/peer/new", [\App\Http\Controllers\PeerController::class, "new"]);
|
|
Route::get("/vpn/syncPeers", [\App\Http\Controllers\PeerController::class, "syncPeers"]);
|
|
|
|
Route::get("/users", [\App\Http\Controllers\UsersController::class, "overview"]);
|
|
Route::post("/users", [\App\Http\Controllers\UsersController::class, "updateUser"]);
|
|
});
|