*/ protected $fillable = [ 'contact_id', 'author_id', 'author_name', 'label', 'description', 'completed', 'completed_at', 'due_at', ]; /** * The attributes that should be cast to native types. * * @var array */ protected $casts = [ 'completed' => 'boolean', 'completed_at' => 'datetime', 'due_at' => 'datetime', ]; /** * Get the contact associated with the contact task. */ public function contact(): BelongsTo { return $this->belongsTo(Contact::class); } /** * Get the author associated with the contact task. */ public function author(): BelongsTo { return $this->belongsTo(User::class); } }