Closed frankpde closed 5 years ago
Is this when you use artomator:all or artomator:controller?
When using artomator:controller
Going to need a little more information on this: what's the exact command that you ran to get the issue? Also, when prompted did you specify that a model should be created?
Looking at this if you run: artomator:controller Standalone/TestController
then it works as expected. I think I'll adda a check in the function to see if the Controller
words has been provided on the end of the name and then add if not.
php artisan artomator:controller System/User
and
`$ A App\Models\System\User model does not exist. Do you want to generate it? (yes/no) [yes]:
no`
Must have been that the call was without the Controller. I'd agree to check for Controller and if missing adding it.
Yes, if the command is called without controller on the end then it won’t name it right. In the “all” command it’s added to the call for you.
However the Schema replacements still doesn’t make sense. If you select “no” to the model generation, the command should pick the stub file without the schema. Puzzling.
I’ve added the code to the dev branch for testing, but there is a breaking change at the moment, so double check the readme before using it.
This has been corrected in the latest version v0.2.0-beta.
When creating standalone controllers without creating a model (i.e. for the standard laravel user model), the following issues are observed: