Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit 899c90f

Browse files
committed
fix validation
1 parent 1fe772e commit 899c90f

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

src/Reflex/Repository/Eloquent/BaseRepository.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
use Reflex\Repository\Events\RepositoryEntityDeleted;
1919
use Reflex\Repository\Events\RepositoryEntityUpdated;
2020
use Reflex\Repository\Exceptions\RepositoryException;
21-
use Reflex\Validator\Contracts\ValidatorInterface;
22-
use Reflex\Validator\Exceptions\ValidatorException;
21+
use Prettus\Validator\Contracts\ValidatorInterface;
22+
use Prettus\Validator\Exceptions\ValidatorException;
2323

2424
/**
2525
* Class BaseRepository
@@ -129,7 +129,7 @@ public function presenter()
129129
}
130130

131131
/**
132-
* Specify Validator class name of Reflex\Validator\Contracts\ValidatorInterface
132+
* Specify Validator class name of Prettus\Validator\Contracts\ValidatorInterface
133133
*
134134
* @return null
135135
* @throws Exception
@@ -138,8 +138,8 @@ public function validator()
138138
{
139139

140140
if (isset($this->rules) && !is_null($this->rules) && is_array($this->rules) && !empty($this->rules)) {
141-
if (class_exists('Reflex\Validator\LaravelValidator')) {
142-
$validator = app('Reflex\Validator\LaravelValidator');
141+
if (class_exists('Prettus\Validator\LaravelValidator')) {
142+
$validator = app('Prettus\Validator\LaravelValidator');
143143
if ($validator instanceof ValidatorInterface) {
144144
$validator->setRules($this->rules);
145145

src/Reflex/Repository/Generators/Stubs/controller/controller.stub

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ $NAMESPACE$
55
use Illuminate\Http\Request;
66

77
use $APPNAME$Http\Requests;
8-
use Reflex\Validator\Contracts\ValidatorInterface;
9-
use Reflex\Validator\Exceptions\ValidatorException;
10-
use $APPNAME$Http\Requests\$CLASS$CreateRequest;
11-
use $APPNAME$Http\Requests\$CLASS$UpdateRequest;
8+
use Prettus\Validator\Contracts\ValidatorInterface;
9+
use Prettus\Validator\Exceptions\ValidatorException;
10+
use $APPNAME$Entities\$CLASS$\Requests\$CLASS$CreateRequest;
11+
use $APPNAME$Entities\$CLASS$\Requests\$CLASS$UpdateRequest;
1212
$REPOSITORY$
1313
$VALIDATOR$
1414

src/Reflex/Repository/Generators/Stubs/validator/validator.stub

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
$NAMESPACE$
44

5-
use \Reflex\Validator\Contracts\ValidatorInterface;
6-
use \Reflex\Validator\LaravelValidator;
5+
use \Prettus\Validator\Contracts\ValidatorInterface;
6+
use \Prettus\Validator\LaravelValidator;
77

88
class $CLASS$Validator extends LaravelValidator {
99

0 commit comments

Comments
 (0)