https://github.com/matheusfsc28/layercraft
LayerCraft is a Composer package designed to streamline the creation of layered architecture in Laravel applications. This package automates the generation of necessary folders and templates for classes and interfaces, significantly reducing development time and enhancing code organization.
https://github.com/matheusfsc28/layercraft
composer craft laravel layer layercraft layered-architecture package php
Last synced: 4 months ago
JSON representation
LayerCraft is a Composer package designed to streamline the creation of layered architecture in Laravel applications. This package automates the generation of necessary folders and templates for classes and interfaces, significantly reducing development time and enhancing code organization.
- Host: GitHub
- URL: https://github.com/matheusfsc28/layercraft
- Owner: matheusfsc28
- License: mit
- Created: 2024-10-19T22:49:27.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-21T00:28:05.000Z (over 1 year ago)
- Last Synced: 2025-10-18T11:01:36.839Z (8 months ago)
- Topics: composer, craft, laravel, layer, layercraft, layered-architecture, package, php
- Language: PHP
- Homepage: https://packagist.org/packages/matheusfsc28/layercraft
- Size: 21.5 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
## Langs
- [PT-BR π§π·](#layercraft_pt)
- [EN-US πΊπΈ](#layercraft_en)
# LayerCraft_PT
LayerCraft Γ© um pacote para gerar uma arquitetura em camadas (Controller, Service, Interface, Repository, Model) em aplicaΓ§Γ΅es Laravel. Ele facilita a organizaΓ§Γ£o do cΓ³digo e promove boas prΓ‘ticas de desenvolvimento de maneira Γ‘gil.
## InstalaΓ§Γ£o
VocΓͺ pode instalar o pacote via Composer. Execute o seguinte comando no seu terminal:
```bash
composer require matheusfsc28/layercraft
```
## Como usar
No seu terminal, na pasta do seu projeto Laravel, execute o seguinte comando:
```bash
php artisan layercraft
```
Isso criarΓ‘ a seguinte estrutura no projeto:
```bash
/seu-projeto
βββ app/
β βββ Http/
β β βββ Controllers/
β β βββ Controller.php
β βββ Interfaces/
β β βββ Interface.php
β βββ Models/
β β βββ .php
β βββ Repositories/
β β βββ Repository.php
β βββ Services/
β βββ Service.php
```
VocΓͺ tambΓ©m pode criar suas subpastas para manter a organizaΓ§Γ£o de acordo com suas necessidades:
```bash
php artisan layercraft \
```
A estrutura ficarΓ‘ da seguinte maneira:
```bash
/seu-projeto
βββ app/
β βββ Http/
β β βββ Controllers/
β β βββ /
β β βββ Controller.php
β βββ Interfaces/
β β βββ /
β β βββ Interface.php
β βββ Models/
β β βββ /
β β βββ .php
β βββ Repositories/
β β βββ /
β β βββ Repository.php
β βββ Services/
β βββ /
β βββ Service.php
```
### Estrutura Detalhada
- **Controllers**: ContΓ©m a lΓ³gica do controlador.
- **Interfaces**: Define a interface que o repositΓ³rio deve implementar.
- **Models**: Representa a entidade no banco de dados.
- **Repositories**: ContΓ©m a lΓ³gica de acesso a dados.
- **Services**: Implementa a lΓ³gica de negΓ³cios.
## LicenΓ§a
Este projeto estΓ‘ licenciado sob a LicenΓ§a MIT. Veja o arquivo LICENSE para mais detalhes.
## Contato
Se vocΓͺ tiver dΓΊvidas ou sugestΓ΅es, entre em contato:
- **Nome**: Matheus Felipe
- **Email**:
- **GitHub**: [](https://github.com/matheusfsc28)
- **LinkedIn**: [](https://www.linkedin.com/in/matheusfsc28)
#
# LayerCraft_EN
LayerCraft is a package to generate a layered architecture (Controller, Service, Interface, Repository, Model) in Laravel applications. It helps organize the code and promotes good development practices in an agile way.
## Installation
You can install the package via Composer. Run the following command in your terminal:
```bash
composer require matheusfsc28/layercraft
```
## How to use
In your terminal in the root of your Laravel project, run the following command:
```bash
php artisan layercraft
```
This will create the following structure in the project:
```bash
/your-project
βββ app/
β βββ Http/
β β βββ Controllers/
β β βββ Controller.php
β βββ Interfaces/
β β βββ Interface.php
β βββ Models/
β β βββ .php
β βββ Repositories/
β β βββ Repository.php
β βββ Services/
β βββ Service.php
```
You can also create your subfolders to keep according to your organization:
```bash
php artisan layercraft \
```
The structure will be as follows:
```bash
/your-project
βββ app/
β βββ Http/
β β βββ Controllers/
β β βββ /
β β βββ Controller.php
β βββ Interfaces/
β β βββ /
β β βββ Interface.php
β βββ Models/
β β βββ /
β β βββ .php
β βββ Repositories/
β β βββ /
β β βββ Repository.php
β βββ Services/
β βββ /
β βββ Service.php
```
## Detailed Structure
- **Controllers**: Contains the controller logic.
- **Interfaces**: Defines the interface that the repository must implement.
- **Models**: Represents the entity in the database.
- **Repositories**: Contains the data access logic.
- **Services**: Implements the business logic.
## Contact
If you have any questions or suggestions, please contact:
- **Name**: Matheus Felipe
- **Email**:
- **GitHub**: [](https://github.com/matheusfsc28)
- **LinkedIn**: [](https://www.linkedin.com/in/matheusfsc28)
#