Hi, I have a problem when I am trying to create or update a user for whom I have added a "Institution" relationship. What is weird is I don't get the same error with the skill relationship.
I have the following error : SQLSTATE[42S22]: Column not found: 1054 Unknown column 'institution' in 'field list' update
users
users
SET
institution
institution
= [ "1" ],
users
users
.
updated_at
updated_at
= 2023 -12 -23 15: 20: 14 WHERE
id
id
= 1
Here is my User Model (I stripped what's not useful)
class User extends Authenticatable { protected $fillable = [ 'name', 'firstname', 'email', 'email_verified_at', 'password', 'bio', ];
public function institutions(): BelongsToMany { return $this->belongsToMany(Institution::class); }
public function skills(): BelongsToMany { return $this->belongsToMany(Skill::class); } }