PHPackages                             harrym/domain-support - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. harrym/domain-support

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

harrym/domain-support
=====================

Laravel Domain Support

2.2.2(2mo ago)12.2k↓50%MITPHPPHP ^8.4CI passing

Since Jan 28Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/harrymahardhika/domain-support)[ Packagist](https://packagist.org/packages/harrym/domain-support)[ Docs](https://github.com/harrym/domain-support)[ RSS](/packages/harrym-domain-support/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (9)Versions (14)Used By (0)

DomainSupport
=============

[](#domainsupport)

This project is a Laravel package named `harrym/domain-support`. It provides a set of abstract classes and utilities to support a domain-driven architecture within a Laravel application. The package promotes a structured and consistent way of building applications by providing base classes for common architectural components like actions, repositories, models, and controllers.

The package is built for PHP 8.4+ and Laravel. It has a key dependency on `spatie/laravel-data`.

Key Concepts
------------

[](#key-concepts)

The package provides the following abstract classes to be extended by the application's concrete classes:

- **`AbstractAction`**: Used for business logic. Actions are dispatchable and have a `handle` method where the logic is implemented.
- **`AbstractConstant`**: A utility class to manage and retrieve constants from a class.
- **`AbstractAPIController`**: A base controller for API endpoints. It includes the `SendsJsonResponse` trait for standardized JSON responses.
- **`AbstractWebController`**: A base controller for web routes.
- **`AbstractEvent`**: A base class for domain events, incorporating common Laravel event traits.
- **`AbstractException`**: A custom exception base class.
- **`AbstractModel`**: A base Eloquent model that includes `SoftDeletes` and `HasFactory` traits, and configures pagination based on the `domain-support.php` config file.
- **`AbstractRepository`**: A repository pattern implementation that provides a fluent interface for querying data. It supports searching, sorting, pagination, and filtering using a `CriteriaInterface`.

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

[](#installation)

Install the package via Composer:

```
composer require harrym/domain-support
```

### Configuration

[](#configuration)

The package's configuration file can be published using the following command:

```
php artisan vendor:publish --provider="HarryM\DomainSupport\DomainSupportServiceProvider" --tag="domain-support.config"
```

This will create a `config/domain-support.php` file in the application's config directory.

Testing and Development
-----------------------

[](#testing-and-development)

### Testing

[](#testing)

The project uses Pest and PHPUnit for testing. The tests are located in the `tests` directory. To run the tests, use the following command:

```
composer test
```

### Coding Style

[](#coding-style)

The project uses `laravel/pint` for code style. To format the code, run:

```
composer pint
```

### Static Analysis

[](#static-analysis)

The project uses `larastan/larastan` for static analysis. To run the analysis, use:

```
composer analyse
```

### Automated Refactoring

[](#automated-refactoring)

The project uses `rector/rector` for automated refactoring. The configuration is in `rector.php`. To run rector, use:

```
composer rector
```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

48

—

FairBetter than 95% of packages

Maintenance83

Actively maintained with recent releases

Popularity21

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity66

Established project with proven stability

 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 ~69 days

Recently: every ~10 days

Total

12

Last Release

84d ago

Major Versions

0.4.0 → 1.0.02025-06-04

1.0.0 → 2.0.02025-06-04

1.x-dev → 2.1.12026-02-16

PHP version history (4 changes)0.0.1PHP ^8.1

0.1.0PHP ^8.3

0.3.0PHP ^8.2

2.0.0PHP ^8.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/60742?v=4)[harrym](/maintainers/harrym)[@harrym](https://github.com/harrym)

---

Top Contributors

[![harrymahardhika](https://avatars.githubusercontent.com/u/81987?v=4)](https://github.com/harrymahardhika "harrymahardhika (18 commits)")

---

Tags

laravelDomainSupport

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/harrym-domain-support/health.svg)

```
[![Health](https://phpackages.com/badges/harrym-domain-support/health.svg)](https://phpackages.com/packages/harrym-domain-support)
```

###  Alternatives

[tarfin-labs/event-machine

Event-driven state machines for Laravel with event sourcing, type-safe context, and full audit trail.

188.5k](/packages/tarfin-labs-event-machine)

PHPackages © 2026

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