$memberships * @property-read int|null $memberships_count * @property-read \Illuminate\Notifications\DatabaseNotificationCollection $notifications * @property-read int|null $notifications_count * @property-read \App\Models\User|null $user * @method static \Database\Factories\MemberFactory factory($count = null, $state = []) * @method static \Illuminate\Database\Eloquent\Builder|Member newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|Member newQuery() * @method static \Illuminate\Database\Eloquent\Builder|Member query() * @method static \Illuminate\Database\Eloquent\Builder|Member whereAddress($value) * @method static \Illuminate\Database\Eloquent\Builder|Member whereCity($value) * @method static \Illuminate\Database\Eloquent\Builder|Member whereCompany($value) * @method static \Illuminate\Database\Eloquent\Builder|Member whereCountry($value) * @method static \Illuminate\Database\Eloquent\Builder|Member whereCreatedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|Member whereDateOfBirth($value) * @method static \Illuminate\Database\Eloquent\Builder|Member whereDeletedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|Member whereDolibarrId($value) * @method static \Illuminate\Database\Eloquent\Builder|Member whereEmail($value) * @method static \Illuminate\Database\Eloquent\Builder|Member whereFirstname($value) * @method static \Illuminate\Database\Eloquent\Builder|Member whereGroupId($value) * @method static \Illuminate\Database\Eloquent\Builder|Member whereId($value) * @method static \Illuminate\Database\Eloquent\Builder|Member whereKeycloakId($value) * @method static \Illuminate\Database\Eloquent\Builder|Member whereLastname($value) * @method static \Illuminate\Database\Eloquent\Builder|Member whereNature($value) * @method static \Illuminate\Database\Eloquent\Builder|Member wherePhone1($value) * @method static \Illuminate\Database\Eloquent\Builder|Member wherePhone2($value) * @method static \Illuminate\Database\Eloquent\Builder|Member wherePublicMembership($value) * @method static \Illuminate\Database\Eloquent\Builder|Member whereRetzienEmail($value) * @method static \Illuminate\Database\Eloquent\Builder|Member whereStatus($value) * @method static \Illuminate\Database\Eloquent\Builder|Member whereTypeId($value) * @method static \Illuminate\Database\Eloquent\Builder|Member whereUpdatedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|Member whereUserId($value) * @method static \Illuminate\Database\Eloquent\Builder|Member whereWebsiteUrl($value) * @method static \Illuminate\Database\Eloquent\Builder|Member whereZipcode($value) * @mixin \Eloquent */ class Member extends Model { use HasFactory, Notifiable; protected $fillable = [ 'user_id', 'dolibarr_id', 'keycloak_id', 'status', 'nature', 'type_id', 'group_id', 'lastname', 'firstname', 'email', 'company', 'date_of_birth', 'address', 'zipcode', 'city', 'country', 'phone1', 'phone2', 'public_membership', 'website_url' ]; public static function getAttributeLabel(string $attribute): string { return __("members.fields.$attribute"); } public function getFullNameAttribute(): string { return "{$this->firstname} {$this->lastname}"; } public function user(): BelongsTo { return $this->belongsTo(User::class); } public function group(): BelongsTo { return $this->belongsTo(MemberGroup::class); } public function memberships(): HasMany { return $this->hasMany(Membership::class); } }