gecche / laravel-multidomain

A Laravel extension for using a laravel application on a multi domain setting
MIT License
838 stars 105 forks source link

Can we use --domain=all when using optimize:clear and others #45

Closed yanuaraditia closed 3 years ago

yanuaraditia commented 3 years ago

I've try this awesome plugin for a week and sometimes I need to clear storage for some domains, but that become crowded when using so many domain and trying to clear all.

Can you or someone figure out how to solve this problem

gecche commented 3 years ago

Hi,

thanks for your feedback!

Using "--all" or similar option in an artisan command I think it is not possible because Laravel doesn't allow to switch envs at runtime.

The only way I figure out to solve this is to add some sort of "shell script helpers" ti the package, but I'm not very expert in this: there is another issue currently open, #14, in which we discuss basically the same feature with more details, so I close this issue as a duplicate. In a project with many domains, I currently use hand made scripts for launching commands against a set of domains.

If you want to contribute you are welcome! 👍

Cheers

Giacomo

P.S.: If you like the package please leave a star If you haven't done yet :)