Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 1 commit into from
Closed

Conversation

jamime
Copy link

@jamime jamime commented Jul 17, 2013

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

…f the class will be used unless $table is declared as a public variable in the model.
@jamime
Copy link
Author

jamime commented Aug 15, 2013

Any feedback @JeffreyWay ?

@jamime
Copy link
Author

jamime commented Sep 16, 2013

bump.

@jamime jamime closed this Sep 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to generate attributes if the model has a non-standard table name
1 participant