simaocurado/laravel-extra
Composer 安装命令:
composer require simaocurado/laravel-extra
包简介
Opinionated Laravel defaults for action-oriented architecture, strict typing, code quality, and team consistency.
README 文档
README
axiom is an opinionated package for Laravel projects that want stronger defaults from day one.
It works best on freshly created Laravel projects, where conventions can be applied early with minimal friction.
It brings the same direction used in my starter kits into an existing Laravel app: actions, DTOs, enums, stricter quality tooling, AI guidelines, and a more disciplined baseline for code generation and project setup.
Current target support: Laravel 11, 12, and 13.
What It Brings
- Action-oriented architecture
- DTO-first boundaries
- Final and readonly by default
- CRUD-oriented generators
- AI guidelines and modular AI skills
- Strict Laravel defaults
- Real quality presets for PHPStan, Rector, Pint, and Arch tests
- Optional project scripts and dependency presets
Installation
Install the package:
composer require simaocurado/axiom
Run the installer:
php artisan axiom:install
You can also run it non-interactively:
php artisan axiom:install \ --ai=boost \ --skills \ --auth-routes=app \ --install-auth \ --ssr \ --actions \ --quality \ --strict \ --scripts \ --phpstan \ --rector \ --pint \ --type-coverage \ --debug-tool=debugbar \ --oxlint \ --prettier \ --concurrently \ --ncu
Installer Options
The installer can:
- publish
AGENTS.mdorCLAUDE.md - publish
.ai/skills/*.md - if auth scaffold already exists in the starter kit, leave auth untouched
- when no auth scaffold exists, ask whether auth scaffold should be installed
- support non-interactive auth scaffold installation with
--install-auth - when Fortify is installed, ask whether auth should use Fortify-managed routes or app-managed routes
- when auth scaffold is installed in app-managed mode, publish the React/Vue starter-kit backend auth stubs, routes, and matching Inertia auth pages without duplicating existing settings pages or adding frontend auth dependencies
- when Fortify-managed mode is selected, leave existing Fortify files untouched
- ask whether the project should use SSR and wire that into
composer dev - create
app/Actions,app/Dto, andapp/Enums - publish
phpstan.neon,rector.php,pint.json, andtests/Unit/ArchTest.php - publish a host
App\Providers\AxiomServiceProvider - register that provider in
bootstrap/providers.phpwhen available - add opinionated
composerscripts - add optional PHP tooling dependencies like PHPStan, Rector, Pint, Pest type coverage, Debugbar, and Telescope
- add optional frontend tooling dependencies like Oxlint, Prettier, concurrently, and npm-check-updates
Generated Structure
When you enable architecture-related options, the installer prepares the host project with:
app/Actionsapp/Dtoapp/Enums.ai/architecture.md.ai/quality.md.ai/skills/actions.md.ai/skills/dto.md.ai/skills/enum.md.ai/skills/crud.md.ai/skills/quality.md
Commands
php artisan axiom:installphp artisan make:action Namephp artisan make:dto Namephp artisan make:enum Namephp artisan make:request Namephp artisan make:crud-action Model --operation=createCreates a CRUD-oriented action for a model workflow.
Composer Scripts
composer setupPrepares the project for local development.composer devStarts the local development workflow.composer lintRuns auto-fix quality tools like Rector and Pint.composer fix:rectorApplies Rector refactors.composer testRuns the full project quality and test suite.composer test:type-coverageRuns Pest type coverage.composer test:unitRuns the test suite.composer test:lintRuns lint checks without changing files.composer test:rectorRuns Rector in dry-run mode.composer test:typesRuns static analysis.composer update:requirementsUpdates project dependency constraints.composer configure:app-urlSets the localAPP_URLbased on the project directory name.
Quality Presets
When enabled, Axiom can publish:
phpstan.neonrector.phppint.jsontests/Unit/ArchTest.php
And it can prepare the host project with optional dependencies for:
- Larastan
- PHPStan
- Rector
- Pint
- Pest type coverage
- Oxlint
- Prettier
- frontend quality scripts
Published composer scripts include dedicated Rector commands:
composer fix:rectorcomposer test:rector
Strict Defaults
When strict defaults are enabled, the published host provider configures:
- immutable dates with
CarbonImmutable Model::shouldBeStrict(...)Model::automaticallyEagerLoadRelationships()
AI Guidelines And Skills
Axiom separates global guidance from task-focused workflows:
- guidelines:
AGENTS.md/CLAUDE.md - skills:
.ai/skills/*.md
This makes it easier to keep project rules stable while still giving AI tools focused instructions for actions, DTOs, enums, CRUD, and quality work.
Current Scope
This package is especially useful for fresh Laravel projects or projects that are still early enough to adopt stronger conventions without a painful migration.
It is not trying to replace Laravel. It is trying to make a Laravel app feel closer to my preferred defaults:
- reusable actions
- explicit DTOs
- thin controllers
- strict static analysis
- fail-fast feedback
- cleaner code generation
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Credits
License
The MIT License (MIT). Please see License File for more information.
simaocurado/laravel-extra 适用场景与选型建议
simaocurado/laravel-extra 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 0 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 03 月 31 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「dto」 「actions」 「axiom」 「PHPStan」 「rector」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 simaocurado/laravel-extra 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 simaocurado/laravel-extra 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 simaocurado/laravel-extra 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A Laravel Nova tool to allow for placing actions in the Nova toolbar detached from the checkbox selection mechanism.
PHP library for the MUMSYS project
A simple library that allows transform any kind of data to native php data or whatever
A lightweight WordPress hook helper library. Register hooks before WordPress loads, run callbacks only once, and more.
Data transfer objects
Convert doctrine dbal query result to dto
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 42
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-03-31