2023-03-05 20:14:04 +06:00
|
|
|
<?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 and all of them will
|
|
|
|
| be assigned to the "web" middleware group. Make something great!
|
|
|
|
|
|
|
|
|
*/
|
2023-07-06 10:48:32 +06:00
|
|
|
|
|
|
|
Route::middleware('guest')->group(function () {
|
|
|
|
Route::get('login', [\App\Http\Controllers\AuthController::class, 'login'])->name('login');
|
|
|
|
Route::middleware(['throttle:login'])->post('login', [\App\Http\Controllers\AuthController::class, 'authorization'])->name('authorization');
|
|
|
|
});
|
2023-07-10 21:42:55 +06:00
|
|
|
Route::middleware(['auth', 'verified', 'user.locale'])->group(function () {
|
2023-07-06 10:48:32 +06:00
|
|
|
Route::post('logout', [\App\Http\Controllers\AuthController::class, 'logout'])->name('logout');
|
|
|
|
Route::get('/', [\App\Http\Controllers\Private\DashboardController::class, 'index'])->name('home');
|
|
|
|
Route::prefix('profile')->as('profile.')
|
|
|
|
->group(function () {
|
|
|
|
Route::get('/', [\App\Http\Controllers\Private\ProfileController::class, 'profile'])->name('edit');
|
2023-07-07 00:07:19 +06:00
|
|
|
Route::put('/', [\App\Http\Controllers\Private\ProfileController::class, 'update'])->name('update');
|
|
|
|
Route::put('password', [\App\Http\Controllers\Private\ProfileController::class, 'updatePassword'])->name('update-password');
|
2023-07-06 10:48:32 +06:00
|
|
|
Route::get('settings', [\App\Http\Controllers\Private\ProfileController::class, 'settings'])->name('settings');
|
2023-07-10 21:42:55 +06:00
|
|
|
Route::put('settings', [\App\Http\Controllers\Private\ProfileController::class, 'updateSettings'])->name('update-settings');
|
2023-07-06 10:48:32 +06:00
|
|
|
});
|
2023-07-16 19:21:09 +06:00
|
|
|
|
|
|
|
Route::resource('users', \App\Http\Controllers\Private\UsersController::class)->only(['index', 'create', 'store', 'edit', 'update', 'destroy'])->where(['user' => '[0-9]+']);
|
2023-08-01 22:04:35 +06:00
|
|
|
Route::put('users/{id}/password', [\App\Http\Controllers\Private\UsersController::class, 'updatePassword'])->name('users.update-password')->where(['id' => '[0-9]+']);
|
|
|
|
|
2023-07-16 19:21:09 +06:00
|
|
|
Route::resource('roles', \App\Http\Controllers\Private\RolesController::class)->only(['index', 'create', 'store', 'edit', 'update', 'destroy'])->where(['role' => '[0-9]+']);
|
2023-08-22 00:15:35 +06:00
|
|
|
Route::resource('captcha-tokens', \App\Http\Controllers\Private\CaptchaTokensController::class)->only(['index', 'create', 'store', 'edit', 'update', 'destroy'])->where(['captcha_token' => '[0-9]+']);
|
2023-07-06 10:48:32 +06:00
|
|
|
});
|