Closed maurin88 closed 4 years ago
Laravel naming conventions expect tables to be plural (generally, ending with an 's'). Since Voyager is built on top of Laravel, we make the same assumptions. To fix this, you have to tell laravel what the table name should be, by adding the $table
property to your model class.
This issue has been automatically locked since there has not been any recent activity after it was closed. If you have further questions please ask in our Slack group.
Version information
Description
Tablenames without a "s" at the end will not work with voyager. They alway produce the error:
Illuminate\Database\QueryException SQLSTATE[42S02]: Base table or view not found: 1146 Table 'demo.demotables' doesn't exist (SQL: select * from
demotable**s**
order byid
asc)Steps To Reproduce
Steps to reproduce the behavior:
Expected behavior
Browse the table like other tables with an S at the end. I had no problems using voyager with a table name like "clients" for example. but the german word "mitarbeiter" fails. I know, that voyager has a multilanguage feature, but this is only a workaround to this bug.
Additional context
Also i have encountered a problem with CamelCase notation. DemoTables will create a demo_tables which is not recognized in the BREAD. Maybe this error is related to the first problem.