Files
mmc_info/routes/web.php
Александр Бабкин 34f6fa7733 Projects begin
2022-06-27 16:55:01 +03:00

36 lines
951 B
PHP

<?php
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\UserController;
use App\Http\Controllers\ProjectController;
/*
|--------------------------------------------------------------------------
| 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 view('welcome');
});
Route::get('/dashboard', function () {
return view('dashboard');
})->middleware(['auth'])->name('dashboard');
// Users
Route::prefix('admin')->middleware(['admin'])->group(function () {
Route::resource('/users', UserController::class);
});
// Projects
Route::resource('/projects', ProjectController::class)->middleware(['auth']);
require __DIR__ . '/auth.php';