{"id":36994454,"url":"https://github.com/phpsquad/domain-maker","last_synced_at":"2026-01-13T23:46:40.988Z","repository":{"id":41965724,"uuid":"440108515","full_name":"phpsquad/domain-maker","owner":"phpsquad","description":"Domain Maker makes Domain Driven Development easier in Laravel by providing you with a set of commands to create the scaffolding and boilerplate laravel normally provides but tailored to a Domain Oriented Structure.","archived":false,"fork":false,"pushed_at":"2023-02-17T08:16:49.000Z","size":83,"stargazers_count":86,"open_issues_count":1,"forks_count":17,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-12-21T18:51:16.884Z","etag":null,"topics":["domain-driven-design","laravel","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phpsquad.png","metadata":{"files":{"readme":"readme.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-12-20T09:16:24.000Z","updated_at":"2025-09-26T14:35:47.000Z","dependencies_parsed_at":"2023-01-29T00:00:49.896Z","dependency_job_id":null,"html_url":"https://github.com/phpsquad/domain-maker","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/phpsquad/domain-maker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpsquad%2Fdomain-maker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpsquad%2Fdomain-maker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpsquad%2Fdomain-maker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpsquad%2Fdomain-maker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phpsquad","download_url":"https://codeload.github.com/phpsquad/domain-maker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpsquad%2Fdomain-maker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28405304,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T21:51:37.118Z","status":"ssl_error","status_checked_at":"2026-01-13T21:45:14.585Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["domain-driven-design","laravel","php"],"created_at":"2026-01-13T23:46:40.856Z","updated_at":"2026-01-13T23:46:40.963Z","avatar_url":"https://github.com/phpsquad.png","language":"PHP","readme":"# Domain Maker for Laravel\n\n[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)\n\n## The Why\n\nDomain Driven Design helps us to organize our thoughts and to build apps using logical grouping of our code.\n\nIf you've ever worked on a large laravel project you know how that model directory can grow so large that your ability to find things becomes hampered.\n\nI was inspired by this article https://freek.dev/1486-getting-started-with-domain-oriented-laravel from Freek at Spatie to refactor to Domains.\nI love it! It makes it so much easier to focus on a specific issue without the need to traverse the entire code base.\nIf I'm working on Payments, I live in the payments Domain.\n\nI soon realized refactoring to DDD is pretty straight forward, but the typically wonderful development experience I've grown used to with laravel\nleft a bit to be desired.\n\nAlso, what if I know my project is going to be large, and I want to get a head start and begin development using DDD?\n\nThat's why this package exists.\n\n## How can Domain Maker help you?\n\nDomain Maker makes Domain Driven Development easier in Laravel by providing you with a set of commands to create the scaffolding and boilerplate\nlaravel normally provides but tailored to a Domain Oriented Structure.\n\n- Helpful Commands to:\n  - Automatically scaffold a new Domain with the often needed directories and classes\n  - create controllers\n  - create route files\n  - create models\n  - create repositories\n- Automatic Routes discovery (no need to register routes in the RouteServiceProvider)\n- Automatic View discovery (no need to add view path to config)\n\n### All Domain Maker Commands are under the prefix domain.\n\n```bash\n domain:make:controller        Create a new controller class\n domain:make:domain            Create a new Domain\n domain:make:routes            Create a new routes for domain\n ...\n```\n\n## Install\n\n```bash\ncomposer require phpsquad/domain-maker\n```\n\n## Usage\n\n### Create new Domain\n\n```bash\nphp artisan domain:make:domain\n```\n\nIf this is the first domain the Domains directory will be created under app/Domains along with the specified domain.\n\n```Bash\nDomains\n└── Media\n    ├── Exceptions\n    ├── Http\n    │   ├── Controllers\n    │   │   ├── VimeoController.php\n    │   │   └── YoutubeController.php\n    │   ├── Middleware\n    │   └── Requests\n    │       └── YoutubeRequest.php\n    ├── Jobs\n    │   └── YoutubeSync.php\n    ├── Models\n    │   └── Youtube.php\n    ├── Repositories\n    │   └── YoutubeRepository.php\n    ├── resources\n    │   ├── css\n    │   ├── js\n    │   └── views\n    │       └── youtube-home.blade.php\n    ├── routes\n    │   ├── Media.php\n    │   ├── Vimeo.php\n    │   └── Youtube.php\n    └── Services\n\n\n```\n\n### Routing\n\nA standard route file is created when you create a domain via the `domain:make:domain` command.\n\n\u003e Routes are discovered automatically via the DomainRouteServiceProvider\n\nTo create subsequent route files use:\n\n```bash\ndomain:make:routes  \u003cdomain-name\u003e \u003croute-file-name\u003e\n```\n\nFor example, if I have a \"Payments\" domain, and I'd like to group my Stripe Routes I'd run the command like so:\n\n```bash\ndomain:make:routes Payments Stripe\n```\n\n### Repositories\n\nA repository with standard CRUDs can easily be generate by using the `domain:make:repository`.\n\n```bash\ndomain:make:repository \u003cdomain-name\u003e \u003crepository-name\u003e \u003cmodel-name\u003e\n```\n\nUsing the \"Payments\" domain again to demonstrate, we can use the command as follows:\n\n```bash\ndomain:make:repository Payments PaymentRepository Payment\n```\n\n### Stubs\n\nPublic stubs will be used as a default. If stubs are unpublished, backups are contained in the package.\n\nThere are package specific stubs that you may publish to override (i.e., routes.stub)\n\n\u003e If you don't need to make changes to the stubs it's not necessary to publish them.\n\n```bash\nphp artisan vendor:publish --tag=domain-stubs\n```\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md) for details.\n\n## Credits\n\n- [Richard Rohrig](https://github.com/phpsquad)\n- [All Contributors](https://github.com/phpsquad/domain-maker/contributors)\n\n## Security\n\nIf you discover any security-related issues, please email richard.t.rohrig@gmail.com instead of using the issue tracker.\n\n## License\n\nThe MIT License (MIT). Please see [License File](/LICENSE.md) for more information.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphpsquad%2Fdomain-maker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphpsquad%2Fdomain-maker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphpsquad%2Fdomain-maker/lists"}