TramwayJS

Repository

Will add a new Repository file with supported stubs and the option of adding to dependency injection with linked connection.

Example

tramway create:repository ProductRepository --add-dependency-injection --connection provider.product --key repository.products

Options

ArgumentCommand TypeTypeDefaultRequiredComments
nameargumentstringnoneyesThe name of the Repository class
diroptionstringrepositoriesnoAn option to override the default folder the Repository class will be created in
add-dependency-injectionoptionbooleanfalsenoA flag to indicate that a service declaration should be created when making the Repository
keyoptionstringnonenoThe name of the key to use in dependency injection configuration
connectionoptionstringnonenoThe key of the connection in the service declaration
dependency-injection-diroptionstringservicesnoAn option to override the default folder where the service config will be placed
dependency-injection-filenameoptionstringservicesnoAn option to override the default filename of the service config
versionoptionnumberlatestnoAn option to specify which version of the class to use