{"id":41447155,"url":"https://github.com/ikechukwukalu/makeservice","last_synced_at":"2026-01-23T15:08:08.711Z","repository":{"id":78743050,"uuid":"605775935","full_name":"ikechukwukalu/makeservice","owner":"ikechukwukalu","description":"A laravel package for scaffolding Service, Traits, Enums, Facades, Actions, Repository and Interface classes.","archived":false,"fork":false,"pushed_at":"2025-07-01T19:41:06.000Z","size":65,"stargazers_count":5,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-11T15:30:16.062Z","etag":null,"topics":["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/ikechukwukalu.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-23T21:55:43.000Z","updated_at":"2025-04-21T16:48:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"a4bc9bbc-2864-4901-8bb9-e04259ed552a","html_url":"https://github.com/ikechukwukalu/makeservice","commit_stats":{"total_commits":18,"total_committers":1,"mean_commits":18.0,"dds":0.0,"last_synced_commit":"82f9e443a86f867922a9e3c5a2236350cbd6f116"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/ikechukwukalu/makeservice","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikechukwukalu%2Fmakeservice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikechukwukalu%2Fmakeservice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikechukwukalu%2Fmakeservice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikechukwukalu%2Fmakeservice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ikechukwukalu","download_url":"https://codeload.github.com/ikechukwukalu/makeservice/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikechukwukalu%2Fmakeservice/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28694466,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T14:15:13.573Z","status":"ssl_error","status_checked_at":"2026-01-23T14:09:05.534Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["laravel","php"],"created_at":"2026-01-23T15:08:08.255Z","updated_at":"2026-01-23T15:08:08.706Z","avatar_url":"https://github.com/ikechukwukalu.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MAKE SERVICE\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/ikechukwukalu/makeservice?style=flat-square)](https://packagist.org/packages/ikechukwukalu/makeservice)\n[![Quality Score](https://img.shields.io/scrutinizer/quality/g/ikechukwukalu/makeservice/main?style=flat-square)](https://scrutinizer-ci.com/g/ikechukwukalu/makeservice/)\n[![Code Quality](https://img.shields.io/codefactor/grade/github/ikechukwukalu/makeservice?style=flat-square)](https://www.codefactor.io/repository/github/ikechukwukalu/makeservice)\n[![Known Vulnerabilities](https://snyk.io/test/github/ikechukwukalu/makeservice/badge.svg?style=flat-square)](https://security.snyk.io/package/composer/ikechukwukalu%2Fmakeservice)\n[![Github Workflow Status](https://img.shields.io/github/actions/workflow/status/ikechukwukalu/makeservice/makeservice.yml?branch=main\u0026style=flat-square)](https://github.com/ikechukwukalu/makeservice/actions/workflows/makeservice.yml)\n[![Total Downloads](https://img.shields.io/packagist/dt/ikechukwukalu/makeservice?style=flat-square)](https://packagist.org/packages/ikechukwukalu/makeservice)\n[![Licence](https://img.shields.io/packagist/l/ikechukwukalu/makeservice?style=flat-square)](https://github.com/ikechukwukalu/makeservice/blob/main/LICENSE.md)\n\nA laravel package for scaffolding Service, Traits, Enums, Facades, Actions, Repository and Interface classes.\n\n## REQUIREMENTS\n\n- PHP 7.3+\n- Laravel 8+\n\n## STEPS TO INSTALL\n\n``` shell\ncomposer require ikechukwukalu/makeservice\n```\n\n## SERVICE CLASS\n\nTo generate a new service class.\n\n``` shell\nphp artisan make:service SampleService\n\nphp artisan make:service SampleService  -f //This will overwrite an existing service class.\n```\n\nTo generate a new service class for a particular request class.\n\n``` shell\nphp artisan make:request SampleRequest\n\nphp artisan make:service SampleService --request=SampleRequest\n```\n\nTo generate a service class and a form request class together\n\n```shell\nphp artisan make:service SampleService --request=SampleRequest -e\n```\n\n## TRAIT CLASS\n\nTo generate a new trait class.\n\n``` shell\nphp artisan make:traitclass SampleTrait\n\nphp artisan make:traitclass SampleTrait  -f //This will overwrite an existing trait class.\n```\n\n## ENUM CLASS\n\nTo generate a new enum class.\n\n``` shell\nphp artisan make:enumclass Sample\n\nphp artisan make:enumclass Sample  -f //This will overwrite an existing enum class.\n```\n\n## ACTION CLASS\n\nTo generate a new action class.\n\n``` shell\nphp artisan make:action Sample\n\nphp artisan make:action Sample  -f //This will overwrite an existing action class.\n```\n\n## CONTRACT CLASS\n\nTo generate a new contract/interface  class.\n\n``` shell\nphp artisan make:interfaceclass SampleInterface\n\nphp artisan make:interfaceclass SampleInterface  -f //This will overwrite an existing interface  class.\n```\n\n## REPOSITORY CLASS\n\nTo generate a new repository class for a particular contract/interface  class.\n\n``` shell\nphp artisan make:interfaceclass UserRepositoryInterface --model=User\n\nphp artisan make:repository UserRepository --model=User --interface=UserRepositoryInterface\n\nphp artisan make:repository UserRepository --model=User --interface=UserRepositoryInterface  -f //This will overwrite an existing repository class.\n```\n\nTo generate extra fetch by user id methods.\n\n``` shell\nphp artisan make:interfaceclass UserRepositoryInterface --model=User --user\n\nphp artisan make:repository UserRepository --model=User --interface=UserRepositoryInterface --user\n\nphp artisan make:repository UserRepository --model=User --interface=UserRepositoryInterface --user  -f //This will overwrite an existing repository class.\n```\n\nTo generate a repository class and a contract/interface class together\n\n```shell\nphp artisan make:repository UserRepository --model=User -c\n\n\nphp artisan make:repository UserRepository --model=User --user -c\n```\n\n## FACADE CLASS\n\nTo generate a new facade class.\n\n``` shell\nphp artisan make:facade Sample\n\nphp artisan make:facade Sample  -f //This will overwrite an existing facade class.\n```\n\nTo generate a facade class for a repository class\n\n```shell\nphp artisan make:facade User --contract=UserRepositoryInterface\n```\n\n### Bind the contract and the repository class\n\nThe last thing we need to do is bind `UserRepository` to `UserRepositoryInterface` in Laravel's Service Container. We will do this via a Service Provider. Create one using the following command:\n\n``` shell\nphp artisan make:provider RepositoryServiceProvider\n```\n\nOpen `app/Providers/RepositoryServiceProvider.php` and update the register function to match the following:\n\n``` php\npublic function register()\n{\n    $this-\u003eapp-\u003ebind(UserRepositoryInterface::class, UserRepository::class);\n}\n```\n\nFinally, add the new Service Provider to the providers array in `config/app.php`.\n\n``` php\n'providers' =\u003e [\n    // ...other declared providers\n    App\\Providers\\RepositoryServiceProvider::class,\n];\n```\n\n### Bind the facade and the action class\n\nIf we have a `User` facade class and a `UserService` action class, we would need to add it to Laravel's Service Container. Facades for respository classes will work without any extra binding since they have already been added to the container within the `RepositoryServiceProvider` class, but we would always need to register every facade class we created.\n\nCreate the provider:\n\n``` shell\nphp artisan make:provider FacadeServiceProvider\n```\n\nBind the action class:\n\n``` php\npublic function register()\n{\n    $this-\u003eapp-\u003ebind('user', UserService::class);\n}\n```\n\nRegister the providers:\n\n``` php\n'providers' =\u003e [\n    // ...other declared providers\n    App\\Providers\\FacadeServiceProvider::class,\n    App\\Providers\\RepositoryServiceProvider::class,\n];\n```\n\nFinally, add the facade to the aliases array in `config/app.php`.\n\n``` php\n    'aliases' =\u003e Facade::defaultAliases()-\u003emerge([\n    // ...other declared facades\n        'User' =\u003e App\\Facades\\User::class,\n    ])-\u003etoArray(),\n```\n\n## LICENSE\n\nThe MS package is an open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fikechukwukalu%2Fmakeservice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fikechukwukalu%2Fmakeservice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fikechukwukalu%2Fmakeservice/lists"}