Closed c-myers1 closed 4 years ago
Hi @c-myers1
Its not a laravel issue. Let me explain what was wrong on your above code.
You can't your belongsTo method name same as your foreign key name.
Here your belongsTo method name weeklynetorderid
and foreign key weeklynetorderid
which is same name.
Rename your belongsTo method name weeklynetorder
instead of weeklynetorderid
will solve your problem.
With the command
I'm getting the error:
weeklynetorderid is the foreign key pointing to an id column in another table. The function within the Issuance model is
I generated WeeklyNetorder model already which is being referred to.
My searches for this error seems to indicate when there is confusion between weeklynetorderid as a function or as a property but it hasn't made a solution clearer to me.
How can I troubleshoot?