model file path not reflecting when make model #88
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When running this
php artisan make:migration:schema create_food_beneficials_table --schema="id:integer:unsigned, food_id:integer:unsigned, title:string, description:text:nullable" --model="Models/FoodNutrition/FoodBeneficial"
it calls laravelmake:model
command but it creates model underapp
directory.But when I run
php artisan make:model Models/FoodNutrition/FoodBeneficial
it creates correct model in correct directory insideapp/Models/FoodNutrition
.I see in your https://github.com/laracasts/Laravel-5-Generators-Extended/blob/master/src/Commands/MigrationMakeCommand.php#L103 you are actually generating model name from meta table. Then what is the purpose for option
model
it's been only used as flag if the value of optionmodel
istrue
you are generating model. But it could have been used like laravelmake:model
command where you accept path not generate model name from meta table.So my suggestion is you remove
getModelName
method(https://github.com/laracasts/Laravel-5-Generators-Extended/blob/master/src/Commands/MigrationMakeCommand.php#L219) & you rewrite this part(https://github.com/laracasts/Laravel-5-Generators-Extended/blob/master/src/Commands/MigrationMakeCommand.php#L101-L110) of code like this