-
Notifications
You must be signed in to change notification settings - Fork 40
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
Unable to generate attributes if the model has a non-standard table name #23
Comments
I'm experiencing a similar issue to this (i.e. running |
UPDATE: Having had a bit of a play myself, I've also found that the issue lies in the
This, however, obviously doesn't fix @ingro's issue, which I can only imagine being fixed by getting the table name from the model itself - although I'm not sure quite how to go about doing such a thing. |
Pull request #27 should fix both of these issues 😄.
|
Good stuff, looking forward to it being accepted into the repo 👍 |
I'm experiencing the same problem, too. I create some tables and models in Turkish and parseTableName does not work. BTW I don't think getTable() is a good solution here. What if the model isn't extending Eloquent? We can't use getTable() then. |
I was trying to use this library and found a (possible?) bug.
For various reason I don't have standard table's name and so I used the $table property inside each model to connect it to the right table.
So when I tried to use:
Factory::attributesFor('Pages');
I only got an empty array, and the same with the other available methods.
Further investigation pointed me to the parseTableName method on the Factory class:
I'm actually using a workaround, replacing the return value using the getTable method of Eloquent's model, but I don't know if this is the right way to fix it...
The text was updated successfully, but these errors were encountered: