Skip to content
This repository was archived by the owner on Jul 10, 2021. It is now read-only.

Commit c0e82d7

Browse files
Merge pull request #45 from anetwork/develop
Updated readme file and use App namespace
2 parents 2949d09 + cae9e13 commit c0e82d7

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

readme.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ Add the following provider to providers part of config/app.php
3232
Anetwork\Validation\PersianValidationServiceProvider::class
3333
```
3434

35+
## vendor:publish
36+
You can run vendor:publish command to have custom lang file of package on this path ( resources/lang/validation )
37+
3538
## Usage
3639

3740
You can access to validation rules by passing the rules key according blew following table:
@@ -195,6 +198,3 @@ Validator::make( $request->all(), [
195198
]);
196199
```
197200

198-
### vendor:publish
199-
You can run vendor:publish command to have custom lang file of package on this path ( resources/lang/validation )
200-

src/ValidationMessages.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<?php
22
namespace Anetwork\Validation;
33

4+
use App;
5+
46
/**
57
* @author Shahrokh Niakan <sh.niakan@anetwork.ir>
68
* @since Sep 11, 2016
@@ -24,7 +26,7 @@ class ValidationMessages
2426
*/
2527
public function __construct() {
2628

27-
$this->lang = \App::getLocale();
29+
$this->lang = App::getLocale();
2830

2931
if(! file_exists(resource_path('lang/validation/' . $this->lang . '.php'))){
3032
$this->config = include __DIR__ . '/../lang/' . $this->lang . '.php';

0 commit comments

Comments
 (0)