morphTo('entity'); } /** * Check if a comment has been updated since creation. */ public function isUpdated(): bool { return $this->updated_at->timestamp > $this->created_at->timestamp; } /** * Get created date as a relative diff. * * @return mixed */ public function getCreatedAttribute() { return $this->created_at->diffForHumans(); } /** * Get updated date as a relative diff. * * @return mixed */ public function getUpdatedAttribute() { return $this->updated_at->diffForHumans(); } }