From f6029e99ee376c6b2bb1c166af585393005c6bf9 Mon Sep 17 00:00:00 2001 From: Mike Date: Tue, 1 Feb 2022 16:16:27 +0330 Subject: [PATCH 1/2] publish language files into the defined lang path changed according to https://laravel.com/docs/master/upgrade#the-lang-directory --- src/ValidationRulesServiceProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ValidationRulesServiceProvider.php b/src/ValidationRulesServiceProvider.php index 8e97781..61a8324 100644 --- a/src/ValidationRulesServiceProvider.php +++ b/src/ValidationRulesServiceProvider.php @@ -9,7 +9,7 @@ class ValidationRulesServiceProvider extends ServiceProvider public function boot(): void { $this->publishes([ - __DIR__.'/../resources/lang' => resource_path('lang/vendor/validationRules'), + __DIR__.'/../resources/lang' => app()->langPath() . '/vendor/validationRules', ]); $this->loadTranslationsFrom(__DIR__.'/../resources/lang/', 'validationRules'); From 6b727ee2e32b96cad454eb564f4b2afc07844830 Mon Sep 17 00:00:00 2001 From: Mike Date: Tue, 1 Feb 2022 16:32:09 +0330 Subject: [PATCH 2/2] update README for the language path in Laravel 9.x --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b192e93..df9a0bd 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ The package will automatically register itself. ### Translations -If you wish to edit the package translations, you can run the following command to publish them into your `resources/lang` folder +If you wish to edit the package translations, you can run the following command to publish them into your `resources/lang` (or `/lang` in Laravel 9.x) folder ```bash php artisan vendor:publish --provider="Iamfarhad\Validation\ValidationRulesServiceProvider"