Architecture: Structure your use cases without a framework on top
Architecture gives your Laravel application Actions for use cases, Tasks for reusable steps, Services for business and integration code, typed Data objects and Contexts. Each one is a small abstract class built on Laravel's container and pipeline, so your code stays plain Laravel and you adopt only the pieces you need. It is AI ready: php artisan boost:install teaches your coding agent the whole package through Laravel Boost.
Compatibility
Each line is released for the versions in its row, read from that release's composer.json. Pick the line that matches your project; a combination not listed isn't supported. Find the right line of every package for your project.
| Line | Latest release | PHP | Laravel | Status | Docs |
|---|---|---|---|---|---|
| v13.x | v13.0.0 Nov 30, 2026 | 8.3 – 8.5 | 13 | Current | Docs: Read the v13.x docs |
| v12.x | v12.0.0 Nov 30, 2026 | 8.2 – 8.5 | 12 | Maintained | Docs: Read the v12.x docs |
| v11.x | v11.0.0 Nov 30, 2026 | 8.2 – 8.4 | 11 | MaintainedLaravel 11 no longer gets security fixes | Docs: Read the v11.x docs |
| v10.x | v10.0.0 Nov 30, 2026 | 8.1 – 8.3 | 10 | MaintainedLaravel 10 no longer gets security fixes | Docs: Read the v10.x docs |
| v9.x | v9.0.0 Nov 30, 2026 | 8.0 – 8.2 | 9 | MaintainedLaravel 9 no longer gets security fixes | Docs: Read the v9.x docs |
| v8.x | v8.0.0 Nov 30, 2026 | 8.0 – 8.1 | 8 | MaintainedLaravel 8 no longer gets security fixes | Docs: Read the v8.x docs |
| v7.x | v7.0.0 Nov 30, 2026 | 8.0 | 7 | MaintainedLaravel 7 no longer gets security fixes | Docs: Read the v7.x docs |
| v6.x | v6.0.0 Nov 30, 2026 | 8.0 | 6 | MaintainedLaravel 6 no longer gets security fixes | Docs: Read the v6.x docs |
Maintenance
- Latest release
- v13.0.0
- Nov 30, 2026 (15 hours ago)
From the package's releases and its GitHub Actions. A passing run means the test suite passed on develop, on every PHP version it supports; it isn't a security review, and each release line has its own runs on GitHub. Checked hourly.
A quick look
A use case as an Action that sends a Context through a task pipeline.
1class PlaceOrderAction extends Action 2{ 3 public function handle(OrderContext $context): Order 4 { 5 return DB::transaction(fn () => $this->tasks($context, [ 6 CalculateTotalTask::class, 7 ReserveStockTask::class, 8 CreateOrderTask::class, 9 ])->order);10 }11}12 13$order = PlaceOrderAction::make()->handle(new OrderContext($user, $items));Everything a clean Laravel codebase needs
Five base classes and five generators, with no configuration and nothing running behind your back.
Actions and Tasks
One class per use case or step, with make(), constructor injection and an invokable handle().
Task Pipelines
$this->tasks($payload, [...]) runs Laravel's own pipeline: classes, parameters and closures.
Service Categories
Business, Integration and Boundary services share one Service class and differ only by convention.
Typed Data Objects
fromArray(), fromRequest() and fromModel() with strict types, plus #[MapName], #[Hidden] and #[DataCollection].
Generators
make:action, make:task --pipeline, make:service --integration and more, with custom PSR-4 paths.
AI Ready
Ships a Laravel Boost guideline and an architecture-development skill, so php artisan boost:install teaches Claude Code, Cursor, Codex or Copilot the whole API.
Resources
- DocumentationInstallation, configuration and every API, per version.
- Source on GitHubRead the code, star it, or watch for releases.
- PackagistVersions and install statistics.
- Release notesWhat changed in each release.
- Report an issueFound a bug or missing a feature? Tell us.
- ContributeOpen a pull request; every contributor is credited.
Architecture Questions
Quick answers about installing and using Architecture.
What is Architecture?
A lightweight application architecture for Laravel with Actions, Tasks, Services, typed Data objects and Contexts, plus their Artisan generators, built on the container and pipeline Laravel already ships. It's a free, open-source Laravel package by Pharaonic.
How do I install Architecture?
Run composer require pharaonic/laravel-architecture in your project's root directory.
What does Architecture require?
The latest release requires PHP 8.3 – 8.5 and Laravel 13.
Does it enforce the architecture?
No. The dependency rules are recommendations in the documentation. Nothing validates, intercepts or wraps your calls at runtime, and you can adopt one class without the others.
Do I have to use modules?
No. The generators write to app/ by default and accept a --path for any folder your composer.json maps with PSR-4, with or without a modules package.
Does it handle database transactions?
No, on purpose. Wrap the writes that belong together in DB::transaction() inside your Action, as you would anywhere else in Laravel.
How do I test code that uses Actions and Services?
make() resolves through the container, so Laravel's $this->mock(), bindings and fakes work as usual.
Is Architecture free to use?
Yes. Architecture is open source under the MIT license, so you can use it in personal and commercial projects.
Where can I find the Architecture documentation?
Read the Architecture documentation for setup, configuration, and usage examples.
How do I report a bug or contribute to Architecture?
Open an issue or a pull request on GitHub, ask in GitHub Discussions, or chat with us on Discord.
Ready to dig in?
Read the full documentation for Actions, Tasks and pipelines, the three Service categories, Data objects and their attributes, Contexts, the generators, and the dependency guidelines.