rmariuzzo / Laravel-JS-Localization

🌐 Convert your Laravel messages and consume them in the front-end!
https://github.com/rmariuzzo/laravel-js-localization
MIT License
598 stars 171 forks source link

Make command lazy #175

Closed kriptogenic closed 11 months ago

kriptogenic commented 2 years ago

Every time when laravel container initializes, it creates command objects. That's why you shouldn't use Command constructor for dependency injection

mewejo commented 1 year ago

Nice. One better would be to use return app()->call($this, 'handle'); in fire() to automatically resolve the dependencies.