Skip to content
Permalink
Browse files

formatting

  • Loading branch information
taylorotwell committed Nov 22, 2019
1 parent 0ced00e commit 9beceacb1a1b8ba37cd0f775cb2fb81e21ba4c31
Showing with 5 additions and 6 deletions.
  1. +5 −6 src/Illuminate/Validation/Rules/DatabaseRule.php
@@ -45,8 +45,9 @@ trait DatabaseRule
*/
public function __construct($table, $column = 'NULL')
{
$this->table = $this->resolveTableName($table);
$this->column = $column;
$this->table = $this->resolveTableName($table);
}
/**
@@ -63,11 +64,9 @@ public function resolveTableName($table)
$model = new $table;
if (! $model instanceof Model) {
return $table;
}
return $model->getTable();
return $model instanceof Model
? $model->getTable()
: $table;
}
/**

0 comments on commit 9beceac

Please sign in to comment.
You can’t perform that action at this time.