belongsTo(User::class, 'owner_id'); } public function members(): BelongsToMany { return $this->belongsToMany(User::class) ->withPivot('role') ->as('membership') ->using(OrganisationUser::class) ->withTimestamps(); } public function applications(): HasMany { return $this->hasMany(Application::class); } }