*/ protected $fillable = [ 'account_id', 'user_id', 'name', 'description', ]; /** * The attributes that aren't mass assignable. * * @var array|bool */ protected $guarded = ['id']; /** * The attributes that should be cast to native types. * * @var array */ protected $casts = [ ]; /** * Get the account record associated with the address book. * * @return BelongsTo */ public function account() { return $this->belongsTo(Account::class); } /** * Get the user record associated with the address book. * * @return BelongsTo */ public function user() { return $this->belongsTo(User::class); } /** * Get all contacts for this address book. * * @return HasMany */ public function contacts() { return $this->hasMany(Contact::class); } }