license: built full stack, test and documentation
Some checks failed
docs / build (push) Has been cancelled
docs / deploy (push) Has been cancelled

This commit is contained in:
Giuseppe Naponiello
2026-07-03 12:47:47 +02:00
parent f8206b5840
commit 271acacb1d
39 changed files with 4078 additions and 57 deletions

View File

@@ -0,0 +1,24 @@
<?php
use App\Http\Controllers\LicenseController;
use Illuminate\Support\Facades\Route;
// rotte pubbliche con throttling: le licenze sono informazione pubblica
// (mostrate anche nelle pagine di dettaglio non autenticate).
Route::middleware('throttle:public')->group(function () {
Route::apiResource('licenses', LicenseController::class)
->only(['index', 'show']);
});
// Prefisso `api` e tier applicati dal loader in bootstrap/app.php.
// Lettura dello stato d'uso: utente pienamente operativo.
Route::middleware('tier.app')->group(function () {
Route::get('licenses/{license}/usage', [LicenseController::class, 'usage']);
});
// Scrittura: solo Admin.
Route::middleware('tier.admin')->group(function () {
Route::apiResource('licenses', LicenseController::class)
->only(['store', 'update', 'destroy']);
});