Skip to content

Commit

Permalink
Fix lang path
Browse files Browse the repository at this point in the history
  • Loading branch information
pauloimon committed May 25, 2022
1 parent 1134e42 commit 9b786ec
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 9b786ec

Please sign in to comment.