# WHMCS\Announcement\Announcement

`Class` · extends `AbstractModel`

A client-facing general announcement.

Announcements provide the operator a method to post a message for all clients.

These messages will be displayed in an alert box on the Client's home page.

## Methods

### boot

```php
public static function boot()
```

### parent

```php
public function parent()
```

An announcement may have a parent announcement.

**Returns** `\Illuminate\Database\Eloquent\Relations\HasOne`

### translations

```php
public function translations()
```

An announcement may be a parent of many child announcements.

**Returns** `\Illuminate\Database\Eloquent\Relations\HasMany`

### getUniqueMonthsWithAnnouncements

```php
public static function getUniqueMonthsWithAnnouncements($count = 10)
```

Retrieve a list of the past months in which announcements were posted.

**Parameters**

| Type | Name | Description |
|  --- | --- | --- |
| `int` | `$count` |  |


**Returns** `Collection<Carbon>`

### scopeTranslationsOf

```php
public function scopeTranslationsOf($query, $id = '', $language = '')
```

**Parameters**

| Type | Name | Description |
|  --- | --- | --- |
| `Builder` | `$query` |  |
| `string` | `$id` |  |
| `string` | `$language` |  |


**Returns** `Builder`

### bestTranslation

```php
public function bestTranslation($language = '')
```

### scopePublished

```php
public function scopePublished(Builder $query)
```