incr/routes/web.php
2025-07-10 17:37:30 +02:00

33 lines
1.2 KiB
PHP

<?php
use App\Http\Controllers\Transactions\PurchaseController;
use App\Http\Controllers\Pricing\PricingController;
use Illuminate\Support\Facades\Route;
use Inertia\Inertia;
Route::get('/', function () {
return Inertia::render('welcome');
})->name('home');
Route::get('dashboard', function () {
return Inertia::render('dashboard');
})->name('dashboard');
// Purchase routes
Route::prefix('purchases')->name('purchases.')->group(function () {
Route::get('/', [PurchaseController::class, 'index'])->name('index');
Route::post('/', [PurchaseController::class, 'store'])->name('store');
Route::get('/summary', [PurchaseController::class, 'summary'])->name('summary');
Route::delete('/{purchase}', [PurchaseController::class, 'destroy'])->name('destroy');
});
// Pricing routes
Route::prefix('pricing')->name('pricing.')->group(function () {
Route::get('/current', [PricingController::class, 'current'])->name('current');
Route::post('/update', [PricingController::class, 'update'])->name('update');
Route::get('/history', [PricingController::class, 'history'])->name('history');
Route::get('/date/{date}', [PricingController::class, 'forDate'])->name('for-date');
});
require __DIR__.'/settings.php';
require __DIR__.'/auth.php';