Call to undefined method Illuminate\Database\Eloquent\Relations\BelongsToMany::getOwnerKeyName()

Hi there! Created a simple BelgonsToMany relationship like in Laravel Documentation(https://laravel.com/docs/10.x/eloquent-relationships#many-to-many-defining-the-inverse-of-the-relationship) and I've got the following error:

Call to undefined method Illuminate\Database\Eloquent\Relations\BelongsToMany::getOwnerKeyName()


I've used the example from the FIlament documentation for creating a Select:

 Forms\Components\Select::make('projects')
                    ->relationship('projects', 'name'),


https://flareapp.io/share/Lm8MOMpP

Thank you!
Flare
Call to undefined method Illuminate\Database\Eloquent\Relations\BelongsToMany::getOwnerKeyName() - The error occurred at http://disponibilitati.test/admin/apartments/create
Laravel is a PHP web application framework with expressive, elegant syntax. We’ve already laid the foundation — freeing you to create without sweating the small things.
Was this page helpful?