thedevdojo / voyager

Voyager - The Missing Laravel Admin
https://voyager.devdojo.com
MIT License
11.77k stars 2.67k forks source link

Need to offer more installation options if there is already an existing installation of Voyager #492

Closed abdgad closed 6 years ago

abdgad commented 7 years ago

Description:

Currently, if you re-install Voyager using artisan voyager:install, it will not check if there is an existing installation already in place. The issue is that the installation process will execute again re-doing everything. One of the things that keep happening for example is appending Voyager routes to /routes/web.php everytime you issue in the installation command.

Suggestions:

Check if there is an existing installation. If yes, warn the user and offer more options. This will be an improvement to the installer. Maybe add options to Cancel, Re-Install, Override, Upgrade, etc... What do you guys think?

Also add an option to Clean and Uninstall Voyager.

A simple method to check if there is an existing installation of Voyager:

/**
 * Check if there is an existing installation of Voyager.
 *
 * @return bool
 */
protected function checkExistingInstallation() {
    // if there is a copy of the voyager.php config, it means Voyager is already installed, right?
    return file_exists(config_path('voyager.php'));
}

Steps To Reproduce:

exec php artisan voyager:install multiple times in the same Laravel app.

marktopper commented 7 years ago

I think this would be a quite good idea, however if something went wrong and the user might want to reinstall Voyager, a option --force could be an option.

abdgad commented 7 years ago

I will try to make a PR later to improve the installation process.

antranapp commented 7 years ago

It would be also great if we can make Pages & Post optional. Not all applications need such features.

handiwijoyo commented 7 years ago

@peacemoon Pages & Post will be removed on coming release. And we can still install those using Voyager Hook https://github.com/larapack/voyager-hooks

handiwijoyo commented 6 years ago

This issue should be fixed on 1.0

github-actions[bot] commented 4 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. If you have further questions please ask in our Slack group.