use Laravel\Sanctum\HasApiTokens;
class User extends Authenticatable
{
use HasApiTokens, HasFactory, Notifiable;
}
bash
composer cachewraith:install # asks which front door; defaults to api
composer dump-autoload
php artisan install:api # Laravel 11+ — installs Sanctum (API stack only)
php artisan migrate
bash
php artisan cachewraith:install --stack=api # versioned JSON API (the default)
php artisan cachewraith:install --stack=web # Blade UI, session auth, no build step
php artisan cachewraith:install --stack=both # one set of layers, two front doors
app/
├── Http/
│ ├── Controllers/Web/
│ │ ├── Auth/LoginController.php session auth — skipped if you have Breeze etc.
│ │ ├── DashboardController.php
│ │ └── ItemController.php the same seven decisions as the API's
│ └── Requests/Web/
│ ├── LoginRequest.php
│ ├── StoreItemRequest.php a sibling of V1's, not a reuse
│ └── UpdateItemRequest.php
└── Support/
└── Money.php decimals ↔ integer minor units, in one place
resources/views/
├── layouts/app.blade.php the one layout; no {!! !!} anywhere
├── partials/{alerts,field-error,pagination}.blade.php
├── auth/login.blade.php
├── dashboard.blade.php
├── items/{index,create,edit,show,_form}.blade.php
└── errors/{403,404,419,429,500,503}.blade.php standalone; touch no session
public/vendor/cachewraith/app.css no npm, no Vite, no CDN
routes/web_ui.php your routes/web.php is never touched
tests/
├── Feature/Web/{LoginTest,ItemPageTest}.php
└── Unit/MoneyTest.php
docs/WEB.md pages, session hardening, CSP, styling
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.