Laravel-Test-Helpers icon indicating copy to clipboard operation
Laravel-Test-Helpers copied to clipboard

$this->tableName and $this->class->getTable()

Open reedmaniac opened this issue 11 years ago • 1 comments

Why is the Factory::fire() method trying to build its own table name using $this->parseTableName() instead of using the one defined in the Model itself? Seems like this:

$this->tableName = $this->parseTableName($class);
$this->class = $this->createModel($class);

Could easily become this:

$this->class = $this->createModel($class);
$this->tableName = $this->class->getTable();

This was causing a problem as my Eloquent class names and table names do not line up that often.

reedmaniac avatar Jan 02 '14 22:01 reedmaniac

+1

ceesvanegmond avatar Jan 20 '14 13:01 ceesvanegmond