k2412 / inertia-scaffold-svelte
Artisan command to scaffold Laravel + Inertia v3 + Svelte 5 pages (controller, FormRequest, Service/Action, Svelte CRUD pages, state class) following opinionated architecture conventions.
Requires
- php: ^8.2
- illuminate/console: ^11.0|^12.0|^13.0
- illuminate/filesystem: ^11.0|^12.0|^13.0
- illuminate/support: ^11.0|^12.0|^13.0
- laravel/prompts: ^0.1|^0.2|^0.3
- lorisleiva/laravel-actions: ^2.0
Requires (Dev)
- orchestra/testbench: ^9.0|^10.0
- pestphp/pest: ^3.0
- spatie/pest-plugin-snapshots: ^2.0
This package is auto-updated.
Last update: 2026-04-20 01:15:55 UTC
README
Artisan command that scaffolds Laravel + Inertia v3 + Svelte 5 pages following opinionated architecture conventions (thin controllers, FormRequests, domain services, Laravel Actions, Svelte 5 runes).
Install
composer require k2412/inertia-scaffold-svelte --dev
Laravel auto-discovers the service provider.
Use
php artisan make:inertia-page Project
Walks you through a prompt-driven flow:
- Pick methods to scaffold (index, create, store, show, edit, update, destroy)
- Optional Model + migration + factory + seeder + policy
- Per write method: Service / Action / inline controller
- Optional
lib/states/{kebab}-state.svelte.tsclass
Prints the matching Route::resource(...)->only([...]) line to paste into routes/web.php.
Flag-driven (non-interactive)
php artisan make:inertia-page Project \ --only=index,create,store,show \ --service \ --model \ --no-interaction
Customize stubs
php artisan vendor:publish --tag=inertia-scaffold-svelte-stubs
Edits stubs/vendor/inertia-scaffold-svelte/*.stub in your app — the command reads published stubs first, falls back to package defaults.