Skip to content

Commit

Permalink
check for db before setting verifier
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Dec 23, 2016
1 parent 0ab80a4 commit 038840d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Validation/ValidationServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ protected function registerValidationFactory()
// The validation presence verifier is responsible for determining the existence
// of values in a given data collection, typically a relational database or
// other persistent data stores. And it is used to check for uniqueness.
if (isset($app['validation.presence'])) {
if (isset($app['db']) && isset($app['validation.presence'])) {
$validator->setPresenceVerifier($app['validation.presence']);
}

Expand Down

0 comments on commit 038840d

Please sign in to comment.