Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement base command #1735

Merged
merged 24 commits into from
Feb 13, 2024
Merged

Implement base command #1735

merged 24 commits into from
Feb 13, 2024

Conversation

alissn
Copy link
Contributor

@alissn alissn commented Feb 5, 2024

Hi,

In this pull request, I've begun refactoring the structure of the command. The rules for all commands are as follows:

  1. When called without any arguments, it will show a multiselect of Laravel prompts to choose which module should be checked.
  2. When the option --all is passed, it will check all modules.
  3. Module names can be passed as arguments to the command.

Example:

Option 1:

php artisan module:use
image

Option 2:

php artisan module:use --all
image

Option 3:

php artisan module:use base wallet
image

In this PR, I've updated the following commands:

  • module:use
  • module:unuse
  • module:update
  • module:publish
  • module:publish-config
  • module:publish-migration
  • module:publish-translation
  • module:delete
  • module:migrate
  • module:migrate-status
  • module:migrate-rollback
  • module:migrate-reset
  • module:migrate-refresh
  • module:disable
  • module:enable
  • module:dump
  • module:lang
  • module:seed

@dcblogdev
Copy link
Collaborator

Thanks for this, at LaraconEU I'll review when I'm back

@dcblogdev dcblogdev merged commit 8d1efe0 into nWidart:master Feb 13, 2024
4 checks passed
@dcblogdev
Copy link
Collaborator

Thanks for this, amazing!

@alissn
Copy link
Contributor Author

alissn commented Feb 14, 2024

@dcblogdev
Thank you for reviewing this PR🙏.

During the week, I was thinking about this integration, we can improvement in its structure.

I suggest adding some interfaces like:

  • MultiModulable: for handling multiple modules and --all available options.
  • Modulable: for selecting a single module.
  • Forcable: for implementing the force option.
  • Directionable: for managing the direction option.

after than we can update other commands with Laravel's prompt feature. i'll create new pull request for this feature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants