SUBD_Transport_Company/routes/web.php

38 lines
1.1 KiB
PHP
Raw Normal View History

2024-01-10 10:57:28 +04:00
<?php
2024-01-16 15:14:13 +04:00
use App\Http\Controllers\CarController;
use App\Http\Controllers\DeliveryController;
use App\Http\Controllers\UserController;
2024-01-16 15:14:13 +04:00
use App\Http\Controllers\WarehouseController;
2024-01-10 10:57:28 +04: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 () {
2024-01-16 15:14:13 +04:00
return redirect()->route('deliveries.index');
2024-01-10 10:57:28 +04:00
});
2024-01-16 15:14:13 +04:00
Route::get('/dashboard', function () {
return view('dashboard');
})->middleware(['auth', 'verified'])->name('dashboard');
Route::middleware('auth')->group(function () {
Route::resources([
'users' => UserController::class,
'deliveries' => DeliveryController::class,
'warehouses' => WarehouseController::class,
'users.cars' => CarController::class,
]);
});
require __DIR__.'/auth.php';