spatie / laravel-multitenancy

Make your Laravel app usable by multiple tenants
https://spatie.be/docs/laravel-multitenancy
MIT License
1.11k stars 153 forks source link

Update MultitenancyServiceProvider.php #463

Closed 1cbyc closed 1 year ago

1cbyc commented 1 year ago

It's safer to use the 'Illuminate\Events\Dispatcher' class instead of the 'Illuminate\Support\Facades\Event' facade though. I also think that instead of using the 'isset()' function to check if the 'LARAVEL_OCTANE' environment variable is set, use the 'env()' function to retrieve its value. Considered using the 'app()->singleton()' method to register the 'Multitenancy' class as a singleton, instead of using '$this->app->bind()' in the 'packageBooted()' method. Actually tried something you might not consider necessary too; Renaming the 'packageBooted()' method to 'booted()' to conform to the naming convention of Laravel service providers.

masterix21 commented 1 year ago

Hi @1cbyc, thanks for your time on it, but I prefer our current code.