/fuse-laravel:laravel-architecturefrom fuse-laravel
Structures Laravel projects with clean architecture: services, repositories, actions, DTOs, dependency injection, service container, facades, and production deployment patterns.
Ships in fuse-laravel. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Before ANY implementation, spawn 3 agents in parallel, one Agent call each with a name:
After implementation, run fuse-ai-pilot:sniper for validation.
Laravel architecture focuses on clean separation of concerns, dependency injection, and maintainable code organization. This skill covers everything from project structure to production deployment.
FUSE_SOLID_MAX_LINES - Split larger files per SOLIDapp/
├── Actions/ # Single-purpose action classes
├── Contracts/ # Interfaces (DI)
├── DTOs/ # Data transfer objects
├── Enums/ # PHP 8.1+ enums
├── Events/ # Domain events
├── Http/
│ ├── Controllers/ # Thin controllers
│ ├── Middleware/ # Request filters
│ ├── Requests/ # Form validation
│ └── Resources/ # API transformations
├── Jobs/ # Queued jobs
├── Listeners/ # Event handlers
├── Models/ # Eloquent models only
├── Policies/ # Authorization
├── Providers/ # Service registration
├── Repositories/ # Data access layer
└── Services/ # Business logic
| Reference | When to Use |
|---|---|
| container.md | Dependency injection, binding, resolution |
| providers.md | Service registration, bootstrapping |
| facades.md | Static proxies, real-time facades |
| contracts.md | Interfaces, loose coupling |
| structure.md | Directory organization |
| lifecycle.md | Request handling flow |
| Reference | When to Use |
|---|---|
| configuration.md | Environment, config files |
| installation.md | New project setup |
| upgrade.md | Version upgrades, breaking changes |
| releases.md | Release notes, versioning |
| Reference | When to Use |
|---|---|
| sail.md | Docker development |
| valet.md | macOS native development |
| homestead.md | Vagrant (legacy) |
| octane.md | High-performance servers |
| Reference | When to Use |
|---|---|
| artisan.md | CLI commands, custom commands |
| helpers.md | Global helper functions |
| filesystem.md | File storage, S3, local |
| processes.md | Shell command execution |
| context.md | Request-scoped data sharing |
| Reference | When to Use |
|---|---|
| pennant.md | Feature flags |
| mcp.md | Model Context Protocol |
| concurrency.md | Parallel execution |
| Reference | When to Use |
|---|---|
| deployment.md | Production deployment |
| envoy.md | SSH task automation |
| logging.md | Log channels, formatting |
| errors.md | Exception handling |
| packages.md | Creating packages |
| Template | Purpose |
|---|---|
| UserService.php.md | Service + repository pattern |
| AppServiceProvider.php.md | DI bindings, bootstrapping |
| ArtisanCommand.php.md | CLI commands, signatures, I/O |
| McpServer.php.md | MCP servers, tools, resources, prompts |
| PennantFeature.php.md | Feature flags, A/B testing |
| Envoy.blade.php.md | SSH deployment automation |
| sail-config.md | Docker Sail configuration |
| octane-config.md | FrankenPHP, Swoole, RoadRunner |
| Feature | Reference | Priority |
|---|---|---|
| Service Container | container.md | High |
| Service Providers | providers.md | High |
| Directory Structure | structure.md | High |
| Configuration | configuration.md | High |
| Installation | installation.md | High |
| Octane (Performance) | octane.md | High |
| Sail (Docker) | sail.md | High |
| Artisan CLI | artisan.md | Medium |
| Deployment | deployment.md | Medium |
| Envoy (SSH) | envoy.md | Medium |
| Facades | facades.md | Medium |
| Contracts | contracts.md | Medium |
| Valet (macOS) | valet.md | Medium |
| Upgrade Guide | upgrade.md | Medium |
| Logging | logging.md | Medium |
| Errors | errors.md | Medium |
| Lifecycle | lifecycle.md | Medium |
| Filesystem | filesystem.md | Medium |
| Helpers | helpers.md | Low |
| Pennant (Flags) | pennant.md | Low |
| Context | context.md | Low |
| Processes | processes.md | Low |
| Concurrency | concurrency.md | Low |
| MCP | mcp.md | Low |
| Packages | packages.md | Low |
| Releases | releases.md | Low |
| Homestead | homestead.md | Low |
public function __construct(
private readonly UserServiceInterface $userService,
) {}
public function register(): void
{
$this->app->bind(UserServiceInterface::class, UserService::class);
$this->app->singleton(CacheService::class);
}
php artisan make:provider CustomServiceProvider
php artisan make:command ProcessOrders
$debug = env('APP_DEBUG', false);
$config = config('app.name');
New method to refresh the TTL without recomputing the value.
Cache::touch('user:123', 3600);
Cache::touch('user:123', now()->addHour());
See [[laravel-queues]] for declarative routing per job class (Queue::route(ProcessPodcast::class, connection: 'redis', queue: 'podcasts')) and Queue::forward() (13.26+).
Laravel 13 throws a LogicException when a model is instantiated during its own boot (new static() inside the model's boot() or a trait's boot*()). Move that logic out of the boot cycle.
php artisan dev (13.16+): runs the server, queue:listen, Pail and Vite in a single terminal; customizable via Illuminate\Foundation\DevCommands::artisan('horizon', 'horizon') in AppServiceProvider::boot(), listed via php artisan dev:list (requires Node 22.13+)#[BindWhen(Impl::class, static fn () => ...)] (13.22+): conditional binding declared on the interface — requires PHP 8.5UnitEnum) support in most managers (Cache::store(), Queue, Log, Mail, Auth::guard()…) (13.3 → 13.7)queue:work --memory accepts percentages (13.35+); workers can flush sticky connections between jobs (13.36+); JobProcessed (13.34+) and JobAttempted (13.39+) events carry the job duration#[Table(key: false)] (13.39+) disables the primary key on a model (see [[laravel-eloquent]])| Topic | Before (12) | After (13) |
|---|---|---|
| PHP minimum | 8.2 | 8.3 |
| PHPUnit | 11 | 12 (13 supported) |
| Pest | 3 | 4 (5 with PHP 8.4+) |
| CSRF | VerifyCsrfToken | PreventRequestForgery (origin check via Sec-Fetch-Site) |
| Cache prefix | underscore | hyphens by default (set CACHE_PREFIX, REDIS_PREFIX, SESSION_COOKIE for backward compatibility) |
| Beanstalk | pheanstalk 5.x | pheanstalk 7.x / 8.x |
| Symfony | 7.x | 7.4 / 8.0 |
| Model boot | tolerated | nested instantiation during the model's boot → LogicException |
| Config | — | new cache.serializable_classes (allowlist hardening, default false) |
# Backward-compatible cache prefixes when upgrading from L12
CACHE_PREFIX=laravel_cache_
REDIS_PREFIX=laravel_database_
SESSION_COOKIE=laravel_session
// config/cache.php — deserialization hardening
'serializable_classes' => [
App\DTO\PaymentDto::class,
App\DTO\OrderDto::class,
],
final readonly class for DTOs and Value Objects (PHP 8.3+)interface (dependency inversion)Context::add() to propagate metadata across jobs/requestsserializable_classes in productionapp(Contract::class) over App::make() (strict typing)new static() inside boot() → LogicException in L13)base_path(), storage_path())new ConcreteClass()references/artisan.md (opens in a new tab)references/concurrency.md (opens in a new tab)references/configuration.md (opens in a new tab)references/container.md (opens in a new tab)references/context.md (opens in a new tab)references/contracts.md (opens in a new tab)references/deployment.md (opens in a new tab)references/envoy.md (opens in a new tab)references/errors.md (opens in a new tab)references/facades.md (opens in a new tab)references/filesystem.md (opens in a new tab)references/helpers.md (opens in a new tab)references/homestead.md (opens in a new tab)references/installation.md (opens in a new tab)references/lifecycle.md (opens in a new tab)references/logging.md (opens in a new tab)references/mcp.md (opens in a new tab)references/octane.md (opens in a new tab)references/packages.md (opens in a new tab)references/pennant.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
23 skills in this plugin
/fusecoreUse when creating modules, understanding FuseCore structure, or implementing features in a FuseCore modular-monolith Laravel project./laravel-ai-sdkUse when integrating AI agents, tool calling, embeddings, structured output, or streaming in Laravel 13 via the `laravel/ai` package./laravel-apiUse when creating API endpoints, transforming responses with API Resources, or handling API authentication, rate limiting, or versioning.npx claudepluginhub fusengine/claude-plugins --plugin fuse-laravelOther plugins' skills for the same job