PHPackages                             aungmyokyaw/lara-arch - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. aungmyokyaw/lara-arch

ActiveLibrary[Framework](/categories/framework)

aungmyokyaw/lara-arch
=====================

Laravel components

v1.0.0(2y ago)25MITPHPPHP ^8.1

Since Aug 30Pushed 2y ago1 watchersCompare

[ Source](https://github.com/aungmyokyaw97/lara-arch)[ Packagist](https://packagist.org/packages/aungmyokyaw/lara-arch)[ RSS](/packages/aungmyokyaw-lara-arch/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (4)Versions (3)Used By (0)

Lara-Arch CLI Toolkit Package
=============================

[](#lara-arch-cli-toolkit-package)

The Lara-Arch CLI Toolkit Package is a comprehensive collection of tools and components designed to enhance your Laravel application's command-line interface (CLI) capabilities. This package offers a set of features to streamline development, improve code organization, and optimize command-line interactions.

- DTO
- Service
- Trait
- Enum
- Repository

Installation
------------

[](#installation)

Install the Lara-Arch CLI Toolkit Package using Composer:

```
composer require aungmyokyaw/lara-arch

```

Features
--------

[](#features)

DTO CLI Generator
=================

[](#dto-cli-generator)

Create Data Transfer Objects (DTOs) effortlessly using the DTO CLI generator. Design DTOs to encapsulate data and improve data integrity between different parts of your application.

```
php artisan make:dto [Filename]
```

Service CLI Generator
=====================

[](#service-cli-generator)

Generate service classes using the Service CLI generator. Services are vital for encapsulating business logic and promoting a clean separation of concerns within your application.

```
php artisan make:service [Filename]
```

Trait CLI Generator
===================

[](#trait-cli-generator)

Design and generate reusable traits using the Trait CLI generator. Traits enable you to encapsulate common functionality that can be shared across multiple classes.

```
php artisan make:trit [Filename]
```

Enum CLI Generator
==================

[](#enum-cli-generator)

Simplify the creation of enumerations (enums) in your Laravel application using the Enum CLI generator. Define custom enum types with ease and have them automatically generated with the appropriate values and methods.

```
php artisan make:enum [Filename]
```

Enum Helper
===========

[](#enum-helper)

- enum\_from\_key($enumCases, $key)
- enum\_from\_value($enumCases, $value)

This two Enum helper functions for working with enums in your Laravel application. Here's a sample usage of the two helper functions.

```
enum Status : int {
    case Pending = 0;
    case Approved = 1;
}
```

#### enum\_from\_key($enumCases, $key)

[](#enum_from_keyenumcases-key)

```
enum_from_key(Status::cases(),'Approved') // output = 1

```

#### enum\_from\_value($enumCases, $value)

[](#enum_from_valueenumcases-value)

```
enum_from_value(Status::cases(),0) // output = "Pending"

```

Repository CLI Generator
========================

[](#repository-cli-generator)

Efficiently generate repository classes using the Repository CLI generator. Implement the repository pattern to abstract database operations and promote clean architecture. This repository comes with pre-built CRUD operations that can be used directly or customized as needed.

```
php artisan make:repository [Filename] --model=[ModelName]
```

### Here's a sample usage of the repository for CRUD operations.

[](#heres-a-sample-usage-of-the-repository-for-crud-operations)

```
php artisan make:repository UserRepository --model=User
```

This will create a repository file named UserRepository.php within the app/repositories directory.

```
namespace App\Repositories;

use Amk\LaraArch\BaseRepository;
use App\Models\User;

class UserRepository extends BaseRepository {
    public function getModel(){
        return User::class;
    }
}
```

Example usage for CRUD :

```
$userRepository = new UserRepository();

// Create a new user
$userRepository->create(['name' => 'John Doe', 'email' => 'john@example.com']);

// Find a user by ID
$userRepository->find(1);

// Update a user's information
$userRepository->update(1, ['name' => 'Updated Name']);

// Delete a user
$userRepository->delete(1);

// Retrieve all users
$users = $userRepository->all();

// Retrieve all users with paginate
$users = $userRepository->paginate(10);

// Retrieve users using where query
$users = $userRepository->all(['email' => 'john@example.com']);
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

987d ago

Major Versions

v0.1.0-beta → v1.0.02023-08-30

### Community

Maintainers

![](https://www.gravatar.com/avatar/0cd85400497e59f1cbd6425c3f64ff4c6db9abca024f71f09424656270f1b42e?d=identicon)[aungmyokyaw97](/maintainers/aungmyokyaw97)

---

Top Contributors

[![aungmyokyaw97](https://avatars.githubusercontent.com/u/32431323?v=4)](https://github.com/aungmyokyaw97 "aungmyokyaw97 (3 commits)")

---

Tags

architecturedtosenumlaravellaravel-artisan-commandlaravel-clirepositoryservicestraitlaravelenumtraitservicerepositorydtolaravel cli

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/aungmyokyaw-lara-arch/health.svg)

```
[![Health](https://phpackages.com/badges/aungmyokyaw-lara-arch/health.svg)](https://phpackages.com/packages/aungmyokyaw-lara-arch)
```

###  Alternatives

[laravel/ui

Laravel UI utilities and presets.

2.7k134.9M601](/packages/laravel-ui)[laravel/passport

Laravel Passport provides OAuth2 server support to Laravel.

3.4k85.0M532](/packages/laravel-passport)[laravel/sail

Docker files for running a basic Laravel application.

1.9k186.9M1.0k](/packages/laravel-sail)[laravel/jetstream

Tailwind scaffolding for the Laravel framework.

4.1k19.8M136](/packages/laravel-jetstream)[laravel/breeze

Minimal Laravel authentication scaffolding with Blade and Tailwind.

3.0k31.3M148](/packages/laravel-breeze)[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.5k25.9M107](/packages/laravel-cashier)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
