Files
col-thinkspace/routes/web.php
Chief-spartan-117 972264e361
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled
init
2026-01-21 11:13:09 +05:45

31 lines
1.2 KiB
PHP

<?php
use App\Http\Controllers\Api\ProductController;
use Illuminate\Support\Facades\Route;
use Inertia\Inertia;
use Laravel\Fortify\Features;
Route::get('/', function () {
return Inertia::render('welcome', [
'canRegister' => Features::enabled(Features::registration()),
]);
})->name('home');
Route::middleware(['auth', 'verified'])->group(function () {
Route::get('dashboard', function () {
return Inertia::render('dashboard');
})->name('dashboard');
Route::prefix('product')->name('product.')->group(function () {
Route::get('/', [ProductController::class, 'index'])->name('index');
Route::get('/show', [ProductController::class, 'show'])->name('show');
Route::get('/add', [ProductController::class, 'add'])->name('add');
Route::get('/edit/{id}', [ProductController::class, 'edit'])->name('edit');
Route::post('/store', [ProductController::class, 'store'])->name('store');
Route::post('/update/{id}', [ProductController::class, 'update'])->name('update');
Route::delete('/delete/{id}', [ProductController::class, 'delete'])->name('delete');
});
});
require __DIR__ . '/settings.php';