From 4d276f319816432115eaa539abcfcbf999711222 Mon Sep 17 00:00:00 2001 From: Stephen Ball Date: Sat, 28 Oct 2017 17:28:59 +0100 Subject: [PATCH] Change path to constant --- src/ZxcvbnServiceProvider.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/ZxcvbnServiceProvider.php b/src/ZxcvbnServiceProvider.php index cfae971..bd74fdc 100644 --- a/src/ZxcvbnServiceProvider.php +++ b/src/ZxcvbnServiceProvider.php @@ -7,6 +7,9 @@ class ZxcvbnServiceProvider extends ServiceProvider { + + const TRANSLATIONS_PATH = __DIR__ . '/../resources/lang'; + /** * Bootstrap the application services. * @@ -14,12 +17,10 @@ class ZxcvbnServiceProvider extends ServiceProvider */ public function boot() { - $translations = realpath(__DIR__ . '/../resources/lang'); - - $this->loadTranslationsFrom($translations, 'zxcvbn'); + $this->loadTranslationsFrom(self::TRANSLATIONS_PATH, 'zxcvbn'); $this->publishes([ - $translations => resource_path('lang/vendor/zxcvbn'), + self::TRANSLATIONS_PATH => resource_path('lang/vendor/zxcvbn'), ]); $this->app->make('validator')->extend('zxcvbn', ZxcvbnValidator::class . '@validate');