PHPackages                             pushberryfinn/laravel-domains - 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. pushberryfinn/laravel-domains

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

pushberryfinn/laravel-domains
=============================

A laravel package that manges, creates domains(modules)

23PHP

Since Jun 8Pushed 11mo agoCompare

[ Source](https://github.com/pushberryfinn/laraveldomains)[ Packagist](https://packagist.org/packages/pushberryfinn/laravel-domains)[ RSS](/packages/pushberryfinn-laravel-domains/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Domains
===============

[](#laravel-domains)

A Laravel package to manage and create modular domains inside your Laravel app.

Overview
--------

[](#overview)

This package helps you organize your Laravel application by grouping related code (models, controllers, migrations, routes, commands, etc.) into **domains** — folders inside `app/Domains`. It supports automatic loading of routes, migrations, and commands per domain.

---

Features
--------

[](#features)

- Generate domain folders with a service provider, routes, and basic structure
- Artisan commands to create domain resources like models, controllers, and migrations inside the domain folder
- Automatic discovery of all domains under `app/Domains` and bootstrapping routes, migrations, and commands
- Command auto-registration inside each domain’s `Console/Commands` folder

---

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

[](#installation)

Require the package via composer:

```
composer require pushberryfinn/laravel-domains
```

Publish the package's service provider (if needed):

```
php artisan vendor:publish --provider="Pushberryfinn\LaravelDomains\LaravelDomainsServiceProvider"
```

---

Usage
-----

[](#usage)

### Create a domain

[](#create-a-domain)

```
php artisan domain:make Doctors
```

This will create:

- `app/Domains/Doctors`
- `DomainsServiceProvider.php` inside the domain folder
- A `routes/api.php` file
- The necessary folder structure for models, controllers, commands, migrations, etc.

### Generate domain resources

[](#generate-domain-resources)

Example: Create a model inside the Doctors domain

```
php artisan domain:make-model Doctor --domain=Doctors
```

Similarly, you can create controllers, migrations, and commands scoped to your domain:

```
php artisan domain:make-controller DoctorController --domain=Doctors
php artisan domain:make-migration create_doctors_table --domain=Doctors
php artisan domain:make-command SyncDoctors --domain=Doctors
```

---

How it works
------------

[](#how-it-works)

- Your domains live inside `app/Domains`.
- The main `DomainsServiceProvider` automatically loads routes, migrations, and commands from each domain.
- Commands are auto-registered if placed inside the domain's `Console/Commands` directory.

---

Requirements
------------

[](#requirements)

- PHP 7.4 or higher
- Laravel 8.x

---

License
-------

[](#license)

The MIT License (MIT). See the [LICENSE](LICENSE) file for details.

---

Author
------

[](#author)

Atdhe Krasniqi — [GitHub](https://github.com/pushberryfinn)

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity14

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/7201b8cd031084769d61afcc0ce16afdd24ac88857869394e8feeb54c61389ae?d=identicon)[pushberryfinn](/maintainers/pushberryfinn)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/pushberryfinn-laravel-domains/health.svg)

```
[![Health](https://phpackages.com/badges/pushberryfinn-laravel-domains/health.svg)](https://phpackages.com/packages/pushberryfinn-laravel-domains)
```

PHPackages © 2026

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