JeffreyWay / Laravel-Test-Helpers

Easier testing in Laravel.
https://packagist.org/packages/way/laravel-test-helpers
217 stars 40 forks source link

Models can now override the table used. Table case inconsistency fixed. #27

Closed jamime closed 6 years ago

jamime commented 11 years ago

Models can now override the table used for the factory. The lower-case, plural name of the class will be used unless $table is declared as a public variable in the model.

Fixes #23

Factory::make('User') === Factory::make('user')

The lower-case, plural name of the class will be used as the table name unless another name is explicitly specified. So, in this case, Eloquent will assume the User model stores records in the users table. http://four.laravel.com/docs/eloquent

jamime commented 11 years ago

Any feedback @JeffreyWay ?

jamime commented 11 years ago

bump.