Voyager: "Model Class does not exist. Please create Model before creating relationship." on creating relationships.

Created on 26 Oct 2017  路  12Comments  路  Source: the-control-group/voyager

Hey,
I'm geting a "Model Class does not exist. Please create Model before creating relationship." error on a red alert every time I try to create a relationship, on both ways of it.

I've already created the tables and breads for both entities, and the models are created on the app folder.

What could be missing or wrong?

question user error

Most helpful comment

Resolved via slack. Model class namespace was missing.

All 12 comments

Resolved via slack. Model class namespace was missing.

I have the same error and my model class namespace is not missing

@adeguk, please open your own issue or comment in Slack looking for help.

Hey,
I'm geting a "Model Class does not exist. Please create Model before creating relationship." error on a red alert every time I try to create a relationship, on both ways of it.

I've already created the tables and breads for both entities, and the models are created on the app folder.

What could be missing or wrong?

Please read my previous comment

@Siva-8990 that error occurs when you try to create a relationship between tables without specifying the model class for the other table. If you carefully looked at the form inputs, one of the asked for the model

Got the same problem, recommendations here help. Just don't forget to put the namespace in front of the model in the field, meaning: instead of putting the name of the model "Model", put "App\Model".

I got the same problem , I try to add a relationship, voyager say the model don't exist but he exist in real .
I don't understand , i make foreign key in database and it still the same.

It happened to me as well but the problem was that instead of putting App\Model, I used App/Model and this is wrong... the correct way is with "\" backslash not forward slash. Thanks

Convert the name of the table into a plural form.

To solve this problem, you need to add full path of Model(there is a field which tells you "Full qualified model name...". :)

Please don't comment on really old closed issues. This was for a much older version and has been closed for 18 months now

Was this page helpful?
0 / 5 - 0 ratings