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
[2.1.0] tenancy:install replaces routes file #187
Comments
Running the install command multiple times will cause issues and I don't want to check if every single step of installation has been done before, but checking if the routes file exists seems reasonable. Some people may create it prior to installing the package, maybe even because they're migrating from another implementation. |
Seems like a good default would be like laravel's artisan generators work. When you run the command it will create files if they do not exist but will never overwrite files. However you can overwrite files by using the For example run If you want I can help add this functionality. |
From Laravel:
|
The publishing of migrations and config already use Laravel's already-exists protections. It's only the routes file and the substitutions in Kernel.php that are destructive/additive. |
I agree. Also it's painless to implement, compared to scanning the Kernel for references to tenancy-specific middleware. |
When running
php artisan tenancy:install
it will overwrite theroutes/tenant.php
file contents even if the file already exists.https://github.com/stancl/tenancy/blob/cfcb2574c22a279828d08d767dde63d0c46b4ff4/src/Commands/Install.php#L56-L76
Your setup
The text was updated successfully, but these errors were encountered: