Roman_applicant-site/routes/web.php

50 lines
1.5 KiB
PHP
Raw Normal View History

2024-01-10 12:57:24 +03:00
<?php
2024-01-19 10:48:00 +03:00
use App\Http\Controllers\DocumentsOnlineController;
2024-01-10 14:00:03 +03:00
use App\Http\Controllers\ProfileController;
2024-01-16 16:24:44 +03:00
use App\Http\Controllers\UploadFileController;
2024-01-11 15:10:01 +03:00
use App\Http\Controllers\UserController;
2024-01-10 12:57:24 +03:00
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!
|
*/
Route::get('/', function () {
return view('home');
2024-01-11 15:10:01 +03:00
})->name('home');
2024-01-19 10:48:00 +03:00
Route::resources([
'/users' => UserController::class,
'/documents-online' => DocumentsOnlineController::class
]);
2024-01-11 15:10:01 +03:00
Route::get('/course', function () {
return view('pages.course');
2024-01-17 14:06:42 +03:00
})->name('course');
2024-01-17 09:01:14 +03:00
Route::get('/abitur', function () {
return view('pages.abitur');
2024-01-17 14:06:42 +03:00
})->name('applicant');
2024-01-10 14:00:03 +03:00
2024-01-17 09:01:14 +03:00
Route::post('/uploadfile', [UploadFileController::class, 'showUploadFile'])->name('uploadfile');
2024-01-10 14:00:03 +03:00
Route::get('/dashboard', function () {
2024-01-19 10:48:00 +03:00
return view('admin');
2024-01-10 14:00:03 +03:00
})->middleware(['auth', 'verified'])->name('dashboard');
Route::middleware('auth')->group(function () {
Route::get('/profile', [ProfileController::class, 'edit'])->name('profile.edit');
Route::patch('/profile', [ProfileController::class, 'update'])->name('profile.update');
Route::delete('/profile', [ProfileController::class, 'destroy'])->name('profile.destroy');
});
require __DIR__ . '/auth.php';