gmo-ecs/ecs-command

Command Init Repository and Service

v1.0 2024-11-03 11:36 UTC

This package is auto-updated.

Last update: 2025-05-01 00:17:46 UTC


README

Command Init Repository and Service

Installation

Require this package with composer

composer require gmo-ecs/ecs-command

Copy base repository after installation

php artisan vendor:publish --tag="base-repository"

Repository

  1. Artisan command
php artisan make:repository TestRepository
  1. Specify model for repository
php artisan make:repository TestRepository --model=Test

Service

  1. Artisan command
php artisan make:service TestService
  1. Specify repository for service
php artisan make:service TestService --repository=TestRepository
  1. Specify model for repository when create service
php artisan make:service TestService --repository=TestRepository --model=Test

Controller custom when exists option --repository

  1. Specify repository for controller
php artisan make:controller TestController --repository=TestRepository
  1. Specify model for repository when create controller
php artisan make:controller TestController --repository=TestRepository --model=Test