Skip to content

Commit

Permalink
Change path to constant
Browse files Browse the repository at this point in the history
  • Loading branch information
REBELinBLUE committed Oct 28, 2017
1 parent 9dcbba1 commit 4d276f3
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/ZxcvbnServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,20 @@

class ZxcvbnServiceProvider extends ServiceProvider
{

const TRANSLATIONS_PATH = __DIR__ . '/../resources/lang';

/**
* Bootstrap the application services.
*
* @return void
*/
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');
Expand Down

0 comments on commit 4d276f3

Please sign in to comment.