'datetime', 'is_account_administrator' => 'boolean', ]; /** * Get the account record associated with the user. * * @return BelongsTo */ public function account() { return $this->belongsTo(Account::class); } /** * Get the vault records associated with the user. * * @return BelongsToMany */ public function vaults() { return $this->belongsToMany(Vault::class)->withTimestamps()->withPivot('permission'); } /** * Get the note records associated with the user. * * @return HasMany */ public function notes() { return $this->hasMany(Note::class, 'author_id'); } /** * Get the name of the user. * * @param mixed $value * @return string */ public function getNameAttribute($value): string { return $this->first_name.' '.$this->last_name; } }