Skip to content

Commit

Permalink
Merge pull request #56 from pauloimon/fix-lang-path
Browse files Browse the repository at this point in the history
Correção de compatibilidade do diretório lang
  • Loading branch information
lucascudo authored Jun 2, 2022
2 parents 1134e42 + 9b786ec commit 7470427
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/LaravelPtBRLocalizationServiceProvider.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<?php

namespace Lucascudo\LaravelPtBRLocalization;

use Illuminate\Support\ServiceProvider;

class LaravelPtBRLocalizationServiceProvider extends ServiceProvider
{
/**
Expand All @@ -10,10 +13,9 @@ class LaravelPtBRLocalizationServiceProvider extends ServiceProvider
*/
public function register()
{
$path_command = 'resource_path';//(substr(app()->version(), 0, 1) > 8 && method_exists(app(), 'langPath')) ? app()['langPath'] : resource_path;
$this->publishes([
__DIR__ . '/pt-BR.json' => $path_command('lang/pt-BR.json'),
__DIR__ . '/pt-BR' => $path_command('lang/pt-BR'),
__DIR__ . '/pt-BR.json' => $this->app->langPath() . '/pt-BR.json',
__DIR__ . '/pt-BR' => $this->app->langPath() . '/pt-BR',
], 'laravel-pt-br-localization');
}
}

0 comments on commit 7470427

Please sign in to comment.