Generators
Generators copied to clipboard
Add --force argument to php artisan backpack:crud
WHY
To address this #186
AFTER - What is happening after this PR?
Added --force
argument to php artisan backpack:crud
Is it a breaking change or non-breaking change?
Non-breaking
How can we test the before & after?
php artisan backpack:crud item
php artisan backpack:crud item --force
Awesome! Is this ready @karandatwani92 ? If so, please assign @pxpm to review, test and merge.
Yes @tabacitu , this is ready for review.
Hey @pxpm, Please give it a read and test? Thanks 🙃
@pxpm,
I didn't knew backpack has following signatures:
php artisan backpack:model
php artisan backpack:request
And this doesn't exists
php artisan backpack:controller
Docs only shows the following which i have already covered:
Command | Description. |
---|---|
php artisan backpack:crud-controller | Generate a Backpack CRUD controller. |
php artisan backpack:crud-model | Generate a Backpack CRUD model |
php artisan backpack:crud-request | Generate a Backpack CRUD request |
php artisan backpack:crud-operation | Generate a custom Backpack CRUD operation trait |
I found these two were unmaintained and replaced by newer commands. So, as a final solution i have refactored these two to call newer backpack commands to keep up with newer functionalities.
php artisan backpack:model
php artisan backpack:request
I found these two were unmaintained and replaced by newer commands. So, as a final solution i have refactored these two to call newer backpack commands to keep up with newer functionalities.
php artisan backpack:model php artisan backpack:request
I think this is not correct. backpack:model
had a fix not so much time ago: https://github.com/Laravel-Backpack/Generators/commit/42d23045a3d84d0da41c7749e418a92916b649fb so there may be people still using that command.
If we plan do remove it in favor of the new command it need to be on a new version with a breaking change.
Since we have only the "new commands" documented, and they do the same (or better) than the old ones, we can just add the --force
to the new ones and leave the old ones untouched.
Is there something that backpack:model
does that backpack:crud-model
don't ? what are the differences between them?
Cheers
Hi @pxpm I rechecked, both used to do the same thing with no differences. So I think you can merge.