'datetime', // ]; protected function createdAtFormatted(): Attribute { return Attribute::make( get: fn($value, $attributes) => Carbon::parse($attributes['created_at'])->format('d, M Y H:i'), ); } public function comments() { return $this->morphMany(Comment::class, 'commentable'); } public function user() { return $this->belongsTo(User::class, 'comment_by'); } }