From cae9e139fa0362779be95de1e35b98abc474e97b Mon Sep 17 00:00:00 2001 From: Shahrokh Niakan Date: Wed, 19 Apr 2017 12:42:34 +0430 Subject: [PATCH] Updated readme file and use App namespace Use App namespace for ValidationMessages class --- readme.md | 6 +++--- src/ValidationMessages.php | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/readme.md b/readme.md index 2f4a22f..b34d1b2 100644 --- a/readme.md +++ b/readme.md @@ -32,6 +32,9 @@ Add the following provider to providers part of config/app.php Anetwork\Validation\PersianValidationServiceProvider::class ``` +## vendor:publish +You can run vendor:publish command to have custom lang file of package on this path ( resources/lang/validation ) + ## Usage You can access to validation rules by passing the rules key according blew following table: @@ -195,6 +198,3 @@ Validator::make( $request->all(), [ ]); ``` -### vendor:publish -You can run vendor:publish command to have custom lang file of package on this path ( resources/lang/validation ) - diff --git a/src/ValidationMessages.php b/src/ValidationMessages.php index 2f0061e..a8297af 100644 --- a/src/ValidationMessages.php +++ b/src/ValidationMessages.php @@ -1,6 +1,8 @@ * @since Sep 11, 2016 @@ -24,7 +26,7 @@ class ValidationMessages */ public function __construct() { - $this->lang = \App::getLocale(); + $this->lang = App::getLocale(); if(! file_exists(resource_path('lang/validation/' . $this->lang . '.php'))){ $this->config = include __DIR__ . '/../lang/' . $this->lang . '.php';