Skip to content

Commit 32fd4b8

Browse files
committed
Update LaravelValidateServiceProvider.php
1 parent 36a5bb3 commit 32fd4b8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/LaravelValidateServiceProvider.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use Illuminate\Support\Facades\File;
66
use Illuminate\Support\Facades\Validator;
77
use Illuminate\Support\ServiceProvider;
8+
use Illuminate\Support\Str;
89
use Milwad\LaravelValidate\Utils\CountryPhoneCallback;
910

1011
class LaravelValidateServiceProvider extends ServiceProvider
@@ -31,6 +32,10 @@ protected function publishLangFiles(): void
3132
$langs = File::directories(__DIR__.'/lang');
3233

3334
foreach ($langs as $lang) {
35+
$lang = Str::after($lang, 'lang');
36+
$lang = Str::replace('\\', '', $lang);
37+
$lang = Str::replace('/', '', $lang);
38+
3439
$this->publishes([
3540
__DIR__."/lang/$lang" => lang_path($lang),
3641
], "validate-lang-$lang");

0 commit comments

Comments
 (0)