*/ use HasFactory, LogsActivity; /** * The attributes that are mass assignable. * * @var list */ protected $fillable = [ 'client_id', 'full_name', 'job_title', 'email', 'phone', 'is_principal', ]; /** * Get the attributes that should be cast. * * @return array */ protected function casts(): array { return [ 'is_principal' => 'boolean', ]; } /** * Get the client that owns the contact. * * @return BelongsTo */ public function client(): BelongsTo { return $this->belongsTo(Client::class); } public function getActivitylogOptions(): LogOptions { return LogOptions::defaults() ->logFillable() ->logOnlyDirty() ->dontSubmitEmptyLogs(); } }