BelongsToMany relationship in Repeater

Hey, I've got two models - Ad & Location. The Location model uses a custom primary key $table->string('ekatte')->primary();. Those are both relationships:

    // Location
    public function ads(): BelongsToMany
    {
        return $this->belongsToMany(Ad::class);
    }

    // Ad
    public function locations(): BelongsToMany
    {
        return $this->belongsToMany(Location::class);
    }


When trying to edit an Ad and insert more records using a Repeater with a relationship set, it fails with an error that the property location_ekatte must be added to the $fillable array in the Location model. That property doesn't even exist there... You can check the attached file.

I really appreciate any help you can provide.
EditAd.php14.29KB
Was this page helpful?