rlimjr / lara-clean
There is no license information available for the latest version (1.0.0) of this package.
A Laravel package for domain migrations.
1.0.0
2024-10-28 18:26 UTC
Requires
- php: ^8.2
- laravel/framework: ^11.9
This package is auto-updated.
Last update: 2026-03-02 15:44:55 UTC
README
Description
LaraClean is a Laravel package designed to facilitate domain-driven design (DDD) principles in your application. It provides a set of console commands to help you create and manage your domain models, DTOs, and migrations in a structured and organized way.
Usage
Installation
To install LaraClean, run the following command in your terminal:
composer require rlimjr/lara-clean
Available Commands
LaraClean provides the following console commands:
make:domain: Create a new domain modelmake:domain-dto: Create a new DTO (Data Transfer Object)make:domain-migration: Create a new migration for a domain model
Command Options
--domain: Specify the domain name (required)--name: Specify the model or DTO name (required)--path: Specify the path to the domain directory (optional)
Examples
- Create a new domain model:
php artisan make:domain Question
- Create a new DTO:
php artisan make:dto Question Question
- Create a new migration for a domain model:
php artisan make:domain-migration Question Choices<optional>
Directory Structure
LaraClean assumes the following directory structure for your domain models and DTOs:
app/
Domain/
{domain-name}/
Models/
{model-name}.php
DTOs/
{dto-name}.php
Migrations/
{migration-name}.php