andywer / laravel-js-localization

Simple, ease-to-use and flexible package for the Laravel web framework. Allows you to use localized messages of the Laravel webapp (see `resources/lang` directory) in your Javascript code.
MIT License
143 stars 51 forks source link

Fix for Laravel 5.4 #33

Closed alextripiq closed 7 years ago

alextripiq commented 7 years ago

Laravel 5.4 drops support for $app->share() favouring $app->singleton() instead.

Fixes #31.

andywer commented 7 years ago

Hi! Thanks for your PR.

What is the benefit of this fix compared to #32?

andywer commented 7 years ago

Ok, it works with PHP 5.4 :)

I suppose you tested your fix with Laravel 5.4?

alextripiq commented 7 years ago

I locally modified my vendor/ file while upgrading to L5.4 with this change which seemed to run ok. Happy to favour #32 if you'd rather keep PHP reqs in line with Laravel (just figured if you'd prefer to keep this compatible with L5.3 too then share to singleton should do that).

riskis commented 7 years ago

Thanks for this fix @alextripiq