Skip to content
This repository has been archived by the owner on Jul 27, 2022. It is now read-only.

Commit

Permalink
Merge pull request #48 from lilianjin/patch-1
Browse files Browse the repository at this point in the history
Update FileLoader.php
  • Loading branch information
overtrue committed Sep 4, 2019
2 parents d495352 + 008665d commit b36ac87
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/FileLoader.php
Expand Up @@ -11,6 +11,7 @@

namespace Overtrue\LaravelLang;

use Illuminate\Support\Str;
use Illuminate\Filesystem\Filesystem;
use Illuminate\Translation\FileLoader as LaravelTranslationFileLoader;

Expand Down Expand Up @@ -67,7 +68,7 @@ protected function loadPath($path, $locale, $group)
{
$result = parent::loadPath($path, $locale, $group);

if (empty($result) && str_contains($locale, '-')) {
if (empty($result) && Str::contains($locale, '-')) {
return parent::loadPath($path, strstr($locale, '-', true), $group);
}

Expand Down

0 comments on commit b36ac87

Please sign in to comment.