diff --git a/src/Illuminate/Validation/Rules/DatabaseRule.php b/src/Illuminate/Validation/Rules/DatabaseRule.php index af5843fa93a2..54434ed757ec 100644 --- a/src/Illuminate/Validation/Rules/DatabaseRule.php +++ b/src/Illuminate/Validation/Rules/DatabaseRule.php @@ -2,8 +2,8 @@ namespace Illuminate\Validation\Rules; -use Closure; use Illuminate\Support\Str; +use Closure; use Illuminate\Database\Eloquent\Model; trait DatabaseRule @@ -55,7 +55,8 @@ public function __construct($table, $column = 'NULL') * @param string $table * @return string */ - public function resolveTableName($table) { + public function resolveTableName($table) + { if (! Str::contains($table, '\\') || ! class_exists($table)) { return $table; } @@ -65,7 +66,7 @@ public function resolveTableName($table) { if (! $model instanceof Model) { return $table; } - + return $model->getTable(); }