Skip to content

Commit 47e82f4

Browse files
authored
Merge pull request #83 from MCMatters/master
Add Laravel 5.4 support
2 parents 69bffb5 + a356d23 commit 47e82f4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Mariuzzo/LaravelJsLocalization/LaravelJsLocalizationServiceProvider.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ public function boot()
4141

4242
// Determines Laravel major version.
4343
$app = $this->app;
44-
$laravelMajorVersion = intval($app::VERSION);
44+
$laravelMajorVersion = (int) $app::VERSION;
4545

46-
// Publishes Laravel-JS-Localization packag files and merge user and
46+
// Publishes Laravel-JS-Localization package files and merge user and
4747
// package configurations.
4848
if ($laravelMajorVersion === 4) {
4949
$config = $this->app['config']->get($configKey, []);
@@ -64,7 +64,7 @@ public function boot()
6464
public function register()
6565
{
6666
// Bind the Laravel JS Localization command into the app IOC.
67-
$this->app['localization.js'] = $this->app->share(function ($app) {
67+
$this->app->singleton('localization.js', function ($app) {
6868
$files = $app['files'];
6969
$langs = $app['path.base'].'/resources/lang';
7070
$messages = $app['config']->get('localization-js.messages');

0 commit comments

Comments
 (0)