@@ -53,7 +53,7 @@ |
||
| 53 | 53 | $this->info('Migration successfully created!'); |
| 54 | 54 | } else { |
| 55 | 55 | $this->error( |
| 56 | - 'Couldn\'t create migration.'.PHP_EOL.' Check the write permissions |
|
| 56 | + 'Couldn\'t create migration.' . PHP_EOL . ' Check the write permissions |
|
| 57 | 57 | within the database/migrations directory.' |
| 58 | 58 | ); |
| 59 | 59 | } |
@@ -24,10 +24,10 @@ |
||
| 24 | 24 | $options['scope'] = $request->scope; |
| 25 | 25 | } |
| 26 | 26 | |
| 27 | - $texts = Text::where(function ($q) use ($options) { |
|
| 27 | + $texts = Text::where(function($q) use ($options) { |
|
| 28 | 28 | foreach ($options as $k => $v) { |
| 29 | 29 | if ($k == 'keyword') { |
| 30 | - $q->where(function ($query) use ($v) { |
|
| 30 | + $q->where(function($query) use ($v) { |
|
| 31 | 31 | $query->where('key', 'LIKE', '%' . $v . '%')->orWhere('value', 'LIKE', '%' . $v . '%'); |
| 32 | 32 | }); |
| 33 | 33 | } else { |
@@ -288,9 +288,9 @@ |
||
| 288 | 288 | |
| 289 | 289 | foreach ($locales as $locale => $val) { |
| 290 | 290 | $router->group([ |
| 291 | - 'prefix' => $locale, |
|
| 292 | - 'as' => $locale . '.', |
|
| 293 | - ], $callback); |
|
| 291 | + 'prefix' => $locale, |
|
| 292 | + 'as' => $locale . '.', |
|
| 293 | + ], $callback); |
|
| 294 | 294 | } |
| 295 | 295 | |
| 296 | 296 | } |
@@ -263,7 +263,7 @@ |
||
| 263 | 263 | */ |
| 264 | 264 | protected function sortReplacements(array $replace) |
| 265 | 265 | { |
| 266 | - return (new Collection($replace))->sortBy(function ($value, $key) { |
|
| 266 | + return (new Collection($replace))->sortBy(function($value, $key) { |
|
| 267 | 267 | return mb_strlen($key) * -1; |
| 268 | 268 | }); |
| 269 | 269 | } |
@@ -203,11 +203,11 @@ |
||
| 203 | 203 | $this->getDb() |
| 204 | 204 | ->table($table) |
| 205 | 205 | ->insert([ |
| 206 | - 'key' => $k, |
|
| 207 | - 'lang' => $lang, |
|
| 208 | - 'scope' => $scope, |
|
| 209 | - 'value' => $v, |
|
| 210 | - ]); |
|
| 206 | + 'key' => $k, |
|
| 207 | + 'lang' => $lang, |
|
| 208 | + 'scope' => $scope, |
|
| 209 | + 'value' => $v, |
|
| 210 | + ]); |
|
| 211 | 211 | } |
| 212 | 212 | } |
| 213 | 213 | return true; |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | ->where('lang', $lang); |
| 81 | 81 | |
| 82 | 82 | if (!is_null($scope)) { |
| 83 | - $query = $query->whereNested(function ($query) use ($scope) { |
|
| 83 | + $query = $query->whereNested(function($query) use ($scope) { |
|
| 84 | 84 | $query->where('scope', 'global'); |
| 85 | 85 | $query->orWhere('scope', $scope); |
| 86 | 86 | }); |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | } |
| 114 | 114 | |
| 115 | 115 | if (!is_null($scope)) { |
| 116 | - $query = $query->whereNested(function ($query) use ($scope) { |
|
| 116 | + $query = $query->whereNested(function($query) use ($scope) { |
|
| 117 | 117 | $query->where('scope', 'global'); |
| 118 | 118 | $query->orWhere('scope', $scope); |
| 119 | 119 | }); |
@@ -35,9 +35,9 @@ |
||
| 35 | 35 | { |
| 36 | 36 | // Publish config files |
| 37 | 37 | $this->publishes([ |
| 38 | - __DIR__ . '/../config/config.php' => config_path('multilang.php'), |
|
| 39 | - __DIR__ . '/../views' => base_path('resources/views/vendor/multilang'), |
|
| 40 | - ]); |
|
| 38 | + __DIR__ . '/../config/config.php' => config_path('multilang.php'), |
|
| 39 | + __DIR__ . '/../views' => base_path('resources/views/vendor/multilang'), |
|
| 40 | + ]); |
|
| 41 | 41 | |
| 42 | 42 | // Append the country settings |
| 43 | 43 | $this->mergeConfigFrom( |
@@ -46,11 +46,11 @@ discard block |
||
| 46 | 46 | ); |
| 47 | 47 | |
| 48 | 48 | // Register blade directives |
| 49 | - Blade::directive('t', function ($expression) { |
|
| 49 | + Blade::directive('t', function($expression) { |
|
| 50 | 50 | return "<?php echo e(t({$expression})); ?>"; |
| 51 | 51 | }); |
| 52 | 52 | |
| 53 | - $this->app['events']->listen(RouteMatched::class, function () { |
|
| 53 | + $this->app['events']->listen(RouteMatched::class, function() { |
|
| 54 | 54 | $scope = $this->app['config']->get('app.scope'); |
| 55 | 55 | if ($scope && $scope != 'global') { |
| 56 | 56 | $this->app['multilang']->setScope($scope); |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | $configPath = __DIR__ . '/../config/config.php'; |
| 72 | 72 | $this->mergeConfigFrom($configPath, 'debugbar'); |
| 73 | 73 | |
| 74 | - $this->app->singleton('multilang', function ($app) { |
|
| 74 | + $this->app->singleton('multilang', function($app) { |
|
| 75 | 75 | $environment = $app->environment(); |
| 76 | 76 | $config = $app['config']->get('multilang'); |
| 77 | 77 | |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | ); |
| 84 | 84 | |
| 85 | 85 | if ($multilang->autoSaveIsAllowed()) { |
| 86 | - $app->terminating(function () use ($multilang) { |
|
| 86 | + $app->terminating(function() use ($multilang) { |
|
| 87 | 87 | $scope = $this->app['config']->get('app.scope'); |
| 88 | 88 | if ($scope && $scope != 'global') { |
| 89 | 89 | $multilang->setScope($scope); |
@@ -98,13 +98,13 @@ discard block |
||
| 98 | 98 | $this->app->alias('multilang', 'Longman\LaravelMultiLang\MultiLang'); |
| 99 | 99 | |
| 100 | 100 | $this->app['command.multilang.migration'] = $this->app->share( |
| 101 | - function () { |
|
| 101 | + function() { |
|
| 102 | 102 | return new MigrationCommand(); |
| 103 | 103 | } |
| 104 | 104 | ); |
| 105 | 105 | |
| 106 | 106 | $this->app['command.multilang.texts'] = $this->app->share( |
| 107 | - function () { |
|
| 107 | + function() { |
|
| 108 | 108 | return new TextsCommand(); |
| 109 | 109 | } |
| 110 | 110 | ); |