PHPackages                             jefhar/laravel-domain-oriented - 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. jefhar/laravel-domain-oriented

AbandonedArchivedProject[Framework](/categories/framework)

jefhar/laravel-domain-oriented
==============================

The Laravel Framework.

v7.6.0(6y ago)07[2 PRs](https://github.com/jefhar/laravel-domain-oriented/pulls)MITPHPPHP ^7.2.5

Since Feb 8Pushed 5y agoCompare

[ Source](https://github.com/jefhar/laravel-domain-oriented)[ Packagist](https://packagist.org/packages/jefhar/laravel-domain-oriented)[ RSS](/packages/jefhar-laravel-domain-oriented/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (10)Versions (90)Used By (0)

[![](https://camo.githubusercontent.com/97b5803421d3fe4307917cb5ab71bb9ad8ea9b32346d92cf52bf68c697d15478/68747470733a2f2f7265732e636c6f7564696e6172792e636f6d2f6474666276766b79702f696d6167652f75706c6f61642f76313536363333313337372f6c61726176656c2d6c6f676f6c6f636b75702d636d796b2d7265642e737667)](https://camo.githubusercontent.com/97b5803421d3fe4307917cb5ab71bb9ad8ea9b32346d92cf52bf68c697d15478/68747470733a2f2f7265732e636c6f7564696e6172792e636f6d2f6474666276766b79702f696d6167652f75706c6f61642f76313536363333313337372f6c61726176656c2d6c6f676f6c6f636b75702d636d796b2d7265642e737667)

[![Build Status](https://camo.githubusercontent.com/c59043e0b28eab034f19dabc49c9222c43e3fbe5e0c6bc2837a5c0086132a211/68747470733a2f2f7472617669732d63692e6f72672f6c61726176656c2f6672616d65776f726b2e737667)](https://travis-ci.org/laravel/framework)[![Total Downloads](https://camo.githubusercontent.com/e93505dcc81f8750a8e183a5fb97dd1294daac165149280e29add0509258f4d0/68747470733a2f2f706f7365722e707567782e6f72672f6c61726176656c2f6672616d65776f726b2f642f746f74616c2e737667)](https://packagist.org/packages/laravel/framework)[![Latest Stable Version](https://camo.githubusercontent.com/c5ffcbe113dda06dd38a2844fa16a8a507540c32a89c6e4a737fbde2f1265ed0/68747470733a2f2f706f7365722e707567782e6f72672f6c61726176656c2f6672616d65776f726b2f762f737461626c652e737667)](https://packagist.org/packages/laravel/framework)[![License](https://camo.githubusercontent.com/f45d904953153ca304a2328243d2733e095eee13a631a1f390709885d41dd692/68747470733a2f2f706f7365722e707567782e6f72672f6c61726176656c2f6672616d65776f726b2f6c6963656e73652e737667)](https://packagist.org/packages/laravel/framework)

About Laravel
-------------

[](#about-laravel)

Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as:

- [Simple, fast routing engine](https://laravel.com/docs/routing).
- [Powerful dependency injection container](https://laravel.com/docs/container).
- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage.
- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent).
- Database agnostic [schema migrations](https://laravel.com/docs/migrations).
- [Robust background job processing](https://laravel.com/docs/queues).
- [Real-time event broadcasting](https://laravel.com/docs/broadcasting).

Laravel is accessible, powerful, and provides tools required for large, robust applications.

About Domain Oriented Laravel
-----------------------------

[](#about-domain-oriented-laravel)

First things first, I didn't come up with this re-design of the Laravel Framework. This builds upon the very fine [blog posts](https://stitcher.io/blog/laravel-beyond-crud-01-domain-oriented-laravel)by [Brent](https://twitter.com/brendt_gd). The steps from the first chapter of Brent's blog have already been performed.

Keep your application layer in `app/App` directories. This is where you will find the `Console`, `Exceptions`, `Http`, and `Providers` directories. They work the same as the default Laravel application, they're just moved down one directory, but still in the `\App` namespace.

Place your Domain logic organized by domain concern within the `app/Domain` directory in the `\Domain` namespace. Support logic should be in the `app/Support` directory within the `\Support` namespace.

### Caveats

[](#caveats)

Any `php artisan make` commands will place the newly created file where stock Laravel expects it to, not where Domain Oriented Laravel expects it to be. If you need `artisan` to create the file, you will need to manually move it to the correct directory. The default location is acceptable for database and test files.

### Additional Changes

[](#additional-changes)

#### Docker

[](#docker)

This comes with an opinionated docker stack for unit testing and deployment. Prepackaged with redis, mysql:8.0, nginx, php:7.4 and mailhog, this stack is easily customizable to suit your needs. Simply add or change a stanza within the [docker-compose](docker-compose.yml) file. The [Makefile](Makefile) contains commands to alias common `docker-compose exec` commands.

#### User Permissions

[](#user-permissions)

I have added the `spatie/data-transfer-object` and `spatie/laravel-permission` packages to the composer environment. After migrating and seeding, you will have three sample users ; a `superAdmin`, an `employee`, and a `subscriber`, all with password `password` and email address of `@example.com`.

The users all have sample [roles and permissions](https://docs.spatie.be/laravel-permission/v3/introduction/)which are defined as class constants in the [UserRoles](app/App/Admin/Permissions/UserRoles.php) and [UserPermissions](app/App/Admin/Permissions/UserPermissions.php) classes.

Modify/remove the [migration](database/migrations/2020_05_09_000000_create_sample_user_roles.php) and [seeder](database/seeds/UsersTableSeeder.php) files as needed. You can also add variables to your `.env` file if you want to change the passwords, emails, or usernames.

\*\* Note that the `laravel/ui` composer package has not been included.

#### Composer

[](#composer)

I added `nunomaduro/larastan`, `sensiolabs/security-checker`, and `squizlabs/php_codesniffer` to the development environment. Unless you rely soley on your IDE to tell you that you have possibly

The command `composer phpcs` will check your `app/` and `tests/` directories to make sure all files are in accordance with [PSR-12](https://www.php-fig.org/psr/psr-12/).

`composer phpcbf` will correct any files that it can in those directories to make sure they follow PSR-12.

Running `composer pretest` will first check your [`composer.lock`](composer.lock) file to search for any [advisories](https://github.com/sensiolabs/security-checker) in the Security Advisories Database. If no security advisories for your packages exist, it will make sure that [larastan](https://github.com/nunomaduro/larastan)approves of your code. If all is still good, your code will be examined to make sure it is in compliance with PSR-12 standards.

`composer test` will run your unit and feature tests.

#### Gitlab CI

[](#gitlab-ci)

Domain Oriented Laravel distribution also comes with a CI pipeline for GitLab. By default, it will install the composer and npm dependencies and create a cache, based upon your gitlab repository and branch. It will then, in parallel, run your unit and feature tests, and dusk tests.

If you have installed [gitlab-runner](https://docs.gitlab.com/runner/install/) locally, either through `brew`or a GitLab source, `make ci` will run your latest git commit through the unit and feature tests.

When you push a [tagged](https://git-scm.com/book/en/v2/Git-Basics-Tagging) commit to GitLab, the deployment stage will run. Before you do that, create an [Envoy.php](https://docs.gitlab.com/ee/ci/examples/laravel_with_gitlab_and_envoy/) file. Also create a deployment user on your server with passwordless login:

```
ssh-keygen -o -a 100 -t ed25519
cat ~/.ssh/id_ed25519.pub >> ~/.ssh/authorized_keys
cat ~/.ssh/id_ed25519
```

- Copy your deployment user's *private key* to your clipboard. In your GitLab project, go to **Settings** &gt; **CI/CD** and expand **Secret variables**. Paste the ssh\_key as an Input variable value, and set the key to `SSH_PRIVATE_KEY` and save the variables.

    This allows the CD system to open an `ssh` connection to your server.
- Copy your deployment user's *public key* to your clipboard. In your Gitlab project, go to **Settings** &gt; **Repository** and expand **Deploy Keys**. Paste the public key in the *Key* field, and give it a name. Remember to **Add Key**.

    This allows GitLab to recognize your user and provides pull authorization from GitLab.
- You may need to give your deployment user `chmod` and `chgrp` permissions. This potentially opens your server to an attack vector through the `Envoy.blade.php` file.

You can also add a `$LOG_SLACK_WEBHOOK_URL` variable if you want slack notifications upon deployment.

### Installation

[](#installation)

From your command line, `composer create-project jefhar/laravel-domain-oriented` will download and install the framework. From there, `make` will build a base docker container for your development environment. After the container has been created, `make docker` will create all the images needed for a complete development environment. If you do not need MailHog running just yet, `make deploy` will boot all containers except MailHog. To install composer dependencies, `make composerinstall`, and to update composer dependencies, `make composerupdate`. Installing npm dependencies is through `make yarninstall`. Use `make yarnupgrade` to upgrade the npm dependencies.

Of course, creating your CSS and JavaScript resources are also `make` commands: `make npmdev`, `make npmprod`and `make npmwatch` will create your resources. Similar `make` commands exist for `phpcs`, `phpcbf` and a pretest.

From within the php-fpm container, `make refresh` will drop your database, migrate all tables, and seed sample users.

Update your `.env` file and browse to [`http://localhost:8080`](http://localhost:8080).

```
composer create-project jefhar/laravel-domain-oriented blog
cd blog
make
make deploy
make composerinstall
make yarninstall
make npmdev
make pretest
make test
docker-compose exec php-fpm sh -c 'cd /application && make refresh'
```

Learning Laravel
----------------

[](#learning-laravel)

Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.

If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains over 1500 video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.

Laravel Sponsors
----------------

[](#laravel-sponsors)

We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the Laravel [Patreon page](https://patreon.com/taylorotwell).

- **[Vehikl](https://vehikl.com/)**
- **[Tighten Co.](https://tighten.co)**
- **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)**
- **[64 Robots](https://64robots.com)**
- **[Cubet Techno Labs](https://cubettech.com)**
- **[Cyber-Duck](https://cyber-duck.co.uk)**
- **[British Software Development](https://www.britishsoftware.co)**
- **[Webdock, Fast VPS Hosting](https://www.webdock.io/en)**
- **[DevSquad](https://devsquad.com)**
- [UserInsights](https://userinsights.com)
- [Fragrantica](https://www.fragrantica.com)
- [SOFTonSOFA](https://softonsofa.com/)
- [User10](https://user10.com)
- [Soumettre.fr](https://soumettre.fr/)
- [CodeBrisk](https://codebrisk.com)
- [1Forge](https://1forge.com)
- [TECPRESSO](https://tecpresso.co.jp/)
- [Runtime Converter](http://runtimeconverter.com/)
- [WebL'Agence](https://weblagence.com/)
- [Invoice Ninja](https://www.invoiceninja.com)
- [iMi digital](https://www.imi-digital.de/)
- [Earthlink](https://www.earthlink.ro/)
- [Steadfast Collective](https://steadfastcollective.com/)
- [We Are The Robots Inc.](https://watr.mx/)
- [Understand.io](https://www.understand.io/)
- [Abdel Elrafa](https://abdelelrafa.com)
- [Hyper Host](https://hyper.host)
- [Appoly](https://www.appoly.co.uk)
- [OP.GG](https://op.gg)
- [云软科技](http://www.yunruan.ltd/)

Contributing
------------

[](#contributing)

Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions).

Code of Conduct
---------------

[](#code-of-conduct)

In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct).

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via . All security vulnerabilities will be promptly addressed.

License
-------

[](#license)

The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity74

Established project with proven stability

 Bus Factor1

Top contributor holds 84.6% 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 ~31 days

Recently: every ~8 days

Total

86

Last Release

2259d ago

Major Versions

v5.8.17 → v6.0.02019-08-27

v5.8.35 → v6.0.22019-09-10

5.5.x-dev → v6.5.22019-11-21

v6.18.0 → v7.0.02020-03-02

v6.18.3 → v7.3.02020-03-24

PHP version history (7 changes)v5.1.0PHP &gt;=5.5.9

v5.3.0PHP &gt;=5.6.4

v5.5.0PHP &gt;=7.0.0

v5.6.0PHP &gt;=7.1.3

v5.6.12PHP ^7.1.3

v6.0.0PHP ^7.2

v7.0.0PHP ^7.2.5

### Community

Maintainers

![](https://www.gravatar.com/avatar/e71fe14cc22a111e0e0271c687561a18f5560478493526c3d7c6a12e8314ae75?d=identicon)[jefhar](/maintainers/jefhar)

---

Top Contributors

[![taylorotwell](https://avatars.githubusercontent.com/u/463230?v=4)](https://github.com/taylorotwell "taylorotwell (4428 commits)")[![driesvints](https://avatars.githubusercontent.com/u/594614?v=4)](https://github.com/driesvints "driesvints (118 commits)")[![daylerees](https://avatars.githubusercontent.com/u/207870?v=4)](https://github.com/daylerees "daylerees (105 commits)")[![GrahamCampbell](https://avatars.githubusercontent.com/u/2829600?v=4)](https://github.com/GrahamCampbell "GrahamCampbell (97 commits)")[![franzliedke](https://avatars.githubusercontent.com/u/249125?v=4)](https://github.com/franzliedke "franzliedke (92 commits)")[![jasonlewis](https://avatars.githubusercontent.com/u/829059?v=4)](https://github.com/jasonlewis "jasonlewis (48 commits)")[![sparksp](https://avatars.githubusercontent.com/u/243893?v=4)](https://github.com/sparksp "sparksp (37 commits)")[![cviebrock](https://avatars.githubusercontent.com/u/166810?v=4)](https://github.com/cviebrock "cviebrock (33 commits)")[![crynobone](https://avatars.githubusercontent.com/u/172966?v=4)](https://github.com/crynobone "crynobone (26 commits)")[![tobsn](https://avatars.githubusercontent.com/u/109529?v=4)](https://github.com/tobsn "tobsn (26 commits)")[![JeffreyWay](https://avatars.githubusercontent.com/u/183223?v=4)](https://github.com/JeffreyWay "JeffreyWay (20 commits)")[![tillkruss](https://avatars.githubusercontent.com/u/665029?v=4)](https://github.com/tillkruss "tillkruss (17 commits)")[![JosephSilber](https://avatars.githubusercontent.com/u/1403741?v=4)](https://github.com/JosephSilber "JosephSilber (16 commits)")[![barryvdh](https://avatars.githubusercontent.com/u/973269?v=4)](https://github.com/barryvdh "barryvdh (16 commits)")[![themsaid](https://avatars.githubusercontent.com/u/4332182?v=4)](https://github.com/themsaid "themsaid (16 commits)")[![laurencei](https://avatars.githubusercontent.com/u/1210658?v=4)](https://github.com/laurencei "laurencei (14 commits)")[![bencorlett](https://avatars.githubusercontent.com/u/181919?v=4)](https://github.com/bencorlett "bencorlett (13 commits)")[![neoascetic](https://avatars.githubusercontent.com/u/725836?v=4)](https://github.com/neoascetic "neoascetic (11 commits)")[![ericlbarnes](https://avatars.githubusercontent.com/u/116662?v=4)](https://github.com/ericlbarnes "ericlbarnes (11 commits)")[![jesseobrien](https://avatars.githubusercontent.com/u/865481?v=4)](https://github.com/jesseobrien "jesseobrien (10 commits)")

---

Tags

frameworklaravel

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jefhar-laravel-domain-oriented/health.svg)

```
[![Health](https://phpackages.com/badges/jefhar-laravel-domain-oriented/health.svg)](https://phpackages.com/packages/jefhar-laravel-domain-oriented)
```

###  Alternatives

[unopim/unopim

UnoPim Laravel PIM

10.5k2.4k](/packages/unopim-unopim)[bagisto/bagisto

Bagisto Laravel E-Commerce

27.6k172.1k9](/packages/bagisto-bagisto)[krayin/laravel-crm

Krayin CRM

23.2k33.6k1](/packages/krayin-laravel-crm)[nasirkhan/laravel-starter

A CMS like modular Laravel starter project.

1.4k2.7k](/packages/nasirkhan-laravel-starter)[codewithdennis/larament

Larament is a time-saving starter kit to quickly launch Laravel 13.x projects. It includes FilamentPHP 5.x pre-installed and configured, along with additional tools and features to streamline your development workflow.

3991.8k](/packages/codewithdennis-larament)[ercogx/laravel-filament-starter-kit

This is a Filament v5 Starter Kit for Laravel 13, designed to accelerate the development of Filament-powered applications.

461.7k](/packages/ercogx-laravel-filament-starter-kit)

PHPackages © 2026

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