59 lines
2.4 KiB
PHP
59 lines
2.4 KiB
PHP
<?php
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| 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!
|
|
|
|
|
*/
|
|
|
|
//AUTH
|
|
Auth::routes([
|
|
'verify' => true,
|
|
'register' => true
|
|
]);
|
|
|
|
Route::namespace('Panel')->prefix('panel')->group(function () {
|
|
//Dashboard
|
|
Route::get('/home', 'HomeController@index')->name('panel.home');
|
|
|
|
//UMS
|
|
Route::prefix('ums')->middleware(['permission:user_see'])->group(function () {
|
|
Route::get('/{page?}/{search?}', 'UMSController@index')->where('page', '[0-9]+')->name('panel.ums');
|
|
Route::get('/info/{id}', 'UMSController@info')->where('id', '[0-9]+')->name('panel.ums.info');
|
|
Route::get('/edit/{id}', 'UMSController@edit')->middleware(['permission:user_edit'])->where('id', '[0-9]+')->name('panel.ums.edit');
|
|
Route::post('/update', 'UMSController@update')->middleware(['permission:user_edit'])->name('panel.ums.update');
|
|
Route::get('/delete/{id}', 'UMSController@delete')->where('id', '[0-9]+')->name('panel.ums.delete');
|
|
});
|
|
});
|
|
|
|
//Home
|
|
Route::get('/home', 'HomeController@index')->name('home');
|
|
Route::get('/', 'HomeController@index');
|
|
|
|
//Logout Route
|
|
Route::get('/logout', '\App\Http\Controllers\Auth\LoginController@logout');
|
|
|
|
//2FA Authentication
|
|
Route::prefix('2fa')->group(function () {
|
|
Route::get('/authenticate', 'TwoFactorController@index')->name('2fa.authenticate');
|
|
Route::post('/authenticate', 'TwoFactorController@authenticate');
|
|
Route::post('/toggle', 'ToggleTwoFactorController@toggle')->name('2fa.toggle');
|
|
});
|
|
|
|
//User Profile/Security
|
|
Route::get('/security/{page?}', 'SecurityController@index')->where('page', '^[1-9]\d*$')->name('security');
|
|
Route::get('/profile', 'AccountController@index')->name('profile');
|
|
Route::get('/session/{id}', 'SecurityController@session')->name('session.delete');
|
|
|
|
//Change
|
|
Route::prefix('change')->group(function () {
|
|
Route::get('/', 'ChangeController@index')->name('change');
|
|
Route::post('/password', 'ChangeController@changePassword')->name('change.password');
|
|
Route::post('/email', 'ChangeController@changeEmail')->name('change.email');
|
|
Route::get('/email/{id}/{token}/{email}', 'ChangeController@verifyEmail');
|
|
});
|