Skip to content
Discussion options

You must be logged in to vote

@tabacitu thanks for following up on my topic. I could find a solution to the problem, which i wanted to share, since it seems to be a backpack related issue.

In my "Event" model the field "course" holds the uid of the related Course model.
I noticed that when i rename the "course" function which resolves the relationship to something else, backpack no longer throws and error and correctly resolved the relation.

Before:
public function course(): BelongsTo { return $this->belongsTo(Course::class, 'course', 'uid'); }

After:
public function coursefoo(): BelongsTo { return $this->belongsTo(Course::class, 'course', 'uid'); }

I assume the function to resolve the relation to a model must not h…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@JeremieConstant
Comment options

Answer selected by JeremieConstant
@tabacitu
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants