You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
monitor-doc/routes/web.php

66 lines
3.4 KiB
PHTML

2 years ago
<?php
use App\Http\Controllers\CategoryController;
use App\Http\Controllers\DocumentController;
use App\Http\Controllers\GeneralController;
use App\Http\Controllers\NotificationController;
use App\Http\Controllers\RoleController;
use App\Http\Controllers\TypeController;
2 years ago
use Illuminate\Foundation\Application;
use Illuminate\Support\Facades\Route;
use Inertia\Inertia;
2 years ago
use App\Http\Controllers\UserController;
2 years ago
/*
|--------------------------------------------------------------------------
| 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 () {
2 years ago
return redirect()->route('login');
2 years ago
});
2 years ago
Route::middleware(['auth'])->group(function () {
2 years ago
Route::get('/dashboard', [GeneralController::class, 'index'])->name('dashboard');
2 years ago
Route::get('/users', [UserController::class, 'index'])->name('users.index');
Route::post('/users', [UserController::class, 'store'])->name('users.store');
Route::put('/users/{user}', [UserController::class, 'update'])->name('users.update');
Route::delete('/users/{user}', [UserController::class, 'destroy'])->name('users.destroy');
Route::get('/roles', [RoleController::class, 'index'])->name('roles.index');
Route::post('/roles', [RoleController::class, 'store'])->name('roles.store');
Route::put('/roles/{role}', [RoleController::class, 'update'])->name('roles.update');
Route::delete('/roles/{role}', [RoleController::class, 'destroy'])->name('roles.destroy');
Route::get('/types', [TypeController::class, 'index'])->name('types.index');
Route::post('/types', [TypeController::class, 'store'])->name('types.store');
Route::put('/types/{type}', [TypeController::class, 'update'])->name('types.update');
Route::delete('/types/{type}', [TypeController::class, 'destroy'])->name('types.destroy');
Route::get('/categories', [CategoryController::class, 'index'])->name('categories.index');
Route::post('/categories', [CategoryController::class, 'store'])->name('categories.store');
Route::put('/categories/{category}', [CategoryController::class, 'update'])->name('categories.update');
Route::delete('/categories/{category}', [CategoryController::class, 'destroy'])->name('categories.destroy');
Route::get('/docs', [DocumentController::class, 'index'])->name('docs.index');
2 years ago
Route::get('/docs/export', [DocumentController::class, 'export'])->name('docs.export');
Route::get('/docs/create', [DocumentController::class, 'create'])->name('docs.create');
Route::post('/docs', [DocumentController::class, 'store'])->name('docs.store');
Route::delete('/docs/{doc}', [DocumentController::class, 'destroy'])->name('docs.destroy');
Route::get('/docs/{doc}', [DocumentController::class, 'edit'])->name('docs.edit');
Route::post('/docs/{doc}', [DocumentController::class, 'update'])->name('docs.update');
Route::get('/docs/{doc}/show', [DocumentController::class, 'show'])->name('docs.show');
Route::post('/docs/{doc}/share', [DocumentController::class, 'share'])->name('docs.share');
Route::get('/notification/{notification}', [NotificationController::class, 'redirect'])->name('notification.redirect');
2 years ago
});
2 years ago
require __DIR__.'/auth.php';