2025-07-10 15:24:15 +02:00
|
|
|
<?php
|
|
|
|
|
|
2025-08-01 00:36:05 +02:00
|
|
|
use App\Http\Controllers\AssetController;
|
2025-07-12 18:09:11 +02:00
|
|
|
use App\Http\Controllers\Milestones\MilestoneController;
|
2026-05-02 09:52:42 +02:00
|
|
|
use App\Http\Controllers\Pricing\PricingController;
|
2026-05-02 17:10:00 +02:00
|
|
|
use App\Http\Controllers\TrackerController;
|
|
|
|
|
use App\Http\Controllers\Transactions\EntryController;
|
2025-07-10 15:24:15 +02:00
|
|
|
use Illuminate\Support\Facades\Route;
|
|
|
|
|
use Inertia\Inertia;
|
|
|
|
|
|
|
|
|
|
Route::get('/', function () {
|
2025-07-10 18:04:58 +02:00
|
|
|
return redirect('/dashboard');
|
2025-07-10 15:24:15 +02:00
|
|
|
})->name('home');
|
|
|
|
|
|
2025-07-10 17:20:48 +02:00
|
|
|
Route::get('dashboard', function () {
|
|
|
|
|
return Inertia::render('dashboard');
|
|
|
|
|
})->name('dashboard');
|
|
|
|
|
|
2026-05-02 17:10:00 +02:00
|
|
|
// Tracker routes
|
|
|
|
|
Route::get('/tracker', [TrackerController::class, 'show'])->name('tracker.show');
|
|
|
|
|
Route::post('/tracker', [TrackerController::class, 'store'])->name('tracker.store');
|
|
|
|
|
Route::patch('/tracker', [TrackerController::class, 'update'])->name('tracker.update');
|
|
|
|
|
|
2025-08-01 00:36:05 +02:00
|
|
|
// Asset routes
|
|
|
|
|
Route::prefix('assets')->name('assets.')->group(function () {
|
|
|
|
|
Route::get('/', [AssetController::class, 'index'])->name('index');
|
|
|
|
|
Route::post('/', [AssetController::class, 'store'])->name('store');
|
|
|
|
|
Route::get('/search', [AssetController::class, 'search'])->name('search');
|
|
|
|
|
Route::get('/{asset}', [AssetController::class, 'show'])->name('show');
|
|
|
|
|
});
|
|
|
|
|
|
2026-05-02 17:10:00 +02:00
|
|
|
// Entry routes (replaces purchases)
|
|
|
|
|
Route::prefix('entries')->name('entries.')->group(function () {
|
|
|
|
|
Route::get('/', [EntryController::class, 'index'])->name('index');
|
|
|
|
|
Route::post('/', [EntryController::class, 'store'])->name('store');
|
|
|
|
|
Route::get('/summary', [EntryController::class, 'summary'])->name('summary');
|
|
|
|
|
Route::delete('/{entry}', [EntryController::class, 'destroy'])->name('destroy');
|
2025-07-10 15:24:15 +02:00
|
|
|
});
|
|
|
|
|
|
2025-07-10 17:37:30 +02:00
|
|
|
// 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');
|
|
|
|
|
});
|
|
|
|
|
|
2025-07-12 18:09:11 +02:00
|
|
|
// Milestone routes
|
|
|
|
|
Route::prefix('milestones')->name('milestones.')->group(function () {
|
|
|
|
|
Route::get('/', [MilestoneController::class, 'index'])->name('index');
|
|
|
|
|
Route::post('/', [MilestoneController::class, 'store'])->name('store');
|
|
|
|
|
});
|
|
|
|
|
|
2025-07-10 15:24:15 +02:00
|
|
|
require __DIR__.'/auth.php';
|