SUBD_Transport_Company/routes/web.php
2024-01-16 15:14:13 +04:00

38 lines
1.1 KiB
PHP

<?php
use App\Http\Controllers\CarController;
use App\Http\Controllers\DeliveryController;
use App\Http\Controllers\UserController;
use App\Http\Controllers\WarehouseController;
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 redirect()->route('deliveries.index');
});
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';