Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Nov 22, 2019
1 parent 0ced00e commit 9beceac
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/Illuminate/Validation/Rules/DatabaseRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand All @@ -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;
}

/**
Expand Down

0 comments on commit 9beceac

Please sign in to comment.