Bug fix in TranslationServiceProvider
This commit is contained in:
parent
6ffe20651a
commit
ec00bfc061
1 changed files with 3 additions and 2 deletions
|
|
@ -6,6 +6,7 @@ use Illuminate\Support\Collection;
|
|||
use Illuminate\Support\Facades\File;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Symfony\Component\Finder\SplFileInfo;
|
||||
|
||||
class TranslationServiceProvider extends ServiceProvider
|
||||
{
|
||||
|
|
@ -35,8 +36,8 @@ class TranslationServiceProvider extends ServiceProvider
|
|||
*/
|
||||
private function collectLocalesStrings(): Collection
|
||||
{
|
||||
return collect(File::allFiles(resource_path('lang/')))->flatMap(function ($file) {
|
||||
if ($file->getRelativePath()) {
|
||||
return collect(File::allFiles(resource_path('lang/')))->flatMap(function (SplFileInfo $file) {
|
||||
if ($file->getRelativePath() and \strpos($file->getRelativePath(), 'vendor') !== 0) {
|
||||
return [$file->getRelativePath() => ''];
|
||||
}
|
||||
})->keys();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue