coderello / laravel-shared-data

📦 An easy way to share the data from your backend to the JavaScript.
https://coderello.com/docs/laravel-shared-data/1.0/sharing-data
MIT License
321 stars 22 forks source link

Make ServiceProvider Deferrable #3

Closed klimov-paul closed 5 years ago

klimov-paul commented 5 years ago

SharedDataServiceProvider is better to be deferrable. It should be loaded only when \Coderello\SharedData\SharedData is requested from DI container.

This will improve application performance for such requests as REST API and console commands.

Note that deferrable service provider definition has been changed in Laravel 5.8. It might be a BC-break change.

hivokas commented 5 years ago

Makes sense, fixed (#5)