Download the PHP package layman/laravel-architect without Composer
On this page you can find all versions of the php package layman/laravel-architect. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download layman/laravel-architect
More information about layman/laravel-architect
Files in layman/laravel-architect
Package laravel-architect
Short Description Laravel package for generating controllers, requests, models, and repositories from configuration.
License MIT
Informations about the package laravel-architect
Laravel Architect
Generate Laravel controllers, form requests, models, and repositories from config/architect.php.
Generated controllers use spatie/laravel-route-attributes by default.
Installation
Install the package in a Laravel application:
Laravel package discovery registers Layman\LaravelArchitect\ArchitectServiceProvider automatically.
Publishing
Publish the config file:
Publish the default stubs if you want to customize generated code:
By default, published stubs are copied to artisan-generator-stubs.
Usage
Generate all configured artifacts:
Generate selected artifact types:
Overwrite existing generated files:
Nested module names are supported:
Use {{modulePath}} in config/architect.php paths if nested module names should also affect output namespaces.
Configuration
config/architect.php controls namespaces and generated files:
Supported placeholders include {{module}}, {{module_snake}}, {{module_kebab}}, {{module_camel}}, {{module_plural}}, {{module_plural_snake}}, {{table}}, and {{variable}}.
The default controller stub adds #[Prefix('{{module_snake}}')], uses #[Post(...)] for every action, and sets #[Defaults('description', '')].
Set route_attributes.enabled to false if controllers should be generated without spatie/laravel-route-attributes imports and PHP attributes.
If you have already published the package stubs, re-publish them or update your controller.stub to use the route attribute placeholders from the package stub.
All versions of laravel-architect with dependencies
illuminate/console Version ^11.0|^12.0|^13.0
illuminate/filesystem Version ^11.0|^12.0|^13.0
illuminate/support Version ^11.0|^12.0|^13.0
spatie/laravel-route-attributes Version ^1.28