How can I change the assumed table name in a relation manager?
Hi everyone,
I have a belongsToMany relation between a medications table and a presentation table.
The pivot table includes extra information so I called it medication_variation.
I created a relation manager but filament is looking for a table called medication_presentation. How can I change it ?
3 Replies
How did you define the relationship in the Model?
If the relationship works fine, then Filament should work fine.
First check somewhere else that relationship working correctly.
The easiest way to test is the web.php in the routes folder.
define a test route and add code something like this:
Thanks @devfaysal The problem was not having defined the inverse relationship
you can also change the model name to "medication_presentation" and define the table name in the model as :
protected $table=medication_variation;