Fixes #214
For now I added all commands available inside ORMProvider from orm package and then I swapped the MakeModelCommand with an internal one. I guess we should do it for some other commands so that models location and migrations location are correctly configured without to pass --models or --directory option each time.
To achieve this I added a way to swap commands in the command capsule by another one at the same key, and then I registered an "Internal ORM Provider" to make the swapping.
Finally end users just see the ORMProvider coming from the masonite package.
What's left to do : duplicate other commands that require some location already defined in Masonite -> actually all commands need this.
Fixes #214 For now I added all commands available inside ORMProvider from orm package and then I swapped the
MakeModelCommand
with an internal one. I guess we should do it for some other commands so that models location and migrations location are correctly configured without to pass --models or --directory option each time.To achieve this I added a way to swap commands in the command capsule by another one at the same key, and then I registered an "Internal ORM Provider" to make the swapping.
Finally end users just see the
ORMProvider
coming from themasonite
package.What's left to do : duplicate other commands that require some location already defined in Masonite -> actually all commands need this.