Download the PHP package ritenn/implementator without Composer
On this page you can find all versions of the php package ritenn/implementator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ritenn/implementator
More information about ritenn/implementator
Files in ritenn/implementator
Package implementator
Short Description Binding automatically interfaces to implementation and also helps creating custom class files e.g. Service or Repository.
License MIT
Informations about the package implementator
Intro
This package adds additional 3 artisan commands that will speed up your development. You can quickly create contract/interface and implement it to your service or repository layer just like with any other artisan commands e.g. etc. Additionally, it automatically binds interface to implementation by base file name, which means that you don't have to waste time to do it manually.
Make your code clean and readable!
Installation
Requires PHP >=7.0 and Laravel 7.x
Publishing config
That will copy 'implementator' config to your app config directory
Available commands and options
-
- creates contract and implementation for your service layer
-
- creates contract and implementation for your repository
- You can also use option , if you want to create just layer without contract implementation
- Finally, you can create contract without implementation using . However, if contracts categorization is enabled in your config you must also specify layer name e.g.
*baseName - e.g. TestService, base name is 'Test', UserRepository > User, CartContract > Cart
Configuration
1) You can change it to 'Interfaces' if you wish, that will affect folders/files/class names
2) If enabled, commands will create additional subfolders for your contracts
3) If enabled, bindings will be loaded from cache in production
4) You can add exceptions for auto-bindings, if your class requires additional parameters that won't be auto resolved by laravel.
e.g.