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" 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');