PHPackages                             marshmallow/nova-activity - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. marshmallow/nova-activity

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

marshmallow/nova-activity
=========================

A Laravel Nova field.

v5.2.1(6mo ago)01.9k↓41.7%MITVuePHP ^8.1

Since Dec 7Pushed 6mo ago2 watchersCompare

[ Source](https://github.com/marshmallow-packages/nova-activity)[ Packagist](https://packagist.org/packages/marshmallow/nova-activity)[ RSS](/packages/marshmallow-nova-activity/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (24)Used By (0)

```
composer require marshmallow/nova-activity
```

```
php artisan vendor:publish --tag="nova-activity-config"
```

```
php artisan vendor:publish --tag="nova-activity-migrations"
```

```
php artisan vendor:publish --tag="nova-activiy-translations"
```

```
// Model
use Marshmallow\NovaActivity\Traits\NovaActivities;
use NovaActivities;
```

```
// Resource
use Marshmallow\NovaActivity\Activity;
Activity::make(__('Comments Field Name'))
    ->types(function () {
        return [
            2 => 'Klant gebeld en gesproken. Mailt aanvullende info',
            // ...
        ];
    })
    ->activityTitle(null)
    ->showOnPreview(),
```

```
->activityTitle('Activity toch!')
->activityTitle(null)
```

```
$model->addActivity(
    user_id: $request->user()->id,
    type: $request->type,
    label: $request->type_label,
    comment: $request->comment,
    created_at: Carbon::parse($request->date)->setTimeFromTimeString(
        now()->format('H:i:s')
    ),
    quick_replies: [
        'user_1' => 'sad',
    ],
    mentions: [
        [
            'key' => 1,
            'class' => User::class,
        ]
    ]
);
```

```
// App\Models\User
public function avatarPath()
{
    return 'https://images.unsplash.com/photo-1550525811-e5869dd03032?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80';
}
```

```
 'quick_replies' => [
    'exited' => [
        'name' => 'Exited',
        'background' => '#ef4444',
        'icon' => 'fire',
        'solid_icon' => false,
    ],
```

```
->types(function () {
    return [
        2 => 'Klant gebel
```

```
->limit(3) // will limit on index, detail and forms
->limitOnDetail(null)
->limitOnIndex(3)
->limitOnForms(10)
->alwaysShowComments()
```

```
// momentjs format
->dateFormat('DD MMM YYYY')
```

```
// momentjs format
->setLocale('nl')
->setLocale(function () {
    return auth()->user()->locale;
})
```

```
->mentions(
    function (): array {
        return User::get()->map(function ($user) {
            return [
                'model' => $user,
                'value' => str_slug($user->name),
                'avatar_url' => Activity::getUserAvatar($user),
                'key' => $user->name,
            ];
        })->toArray();
    },
)

/** Check if this activity has any mentions. */
$activity->hasMentions();

/** Get a collection of all the classes that where mentioned. */
$activity->getMentions();
```

```
return [
    'use_comments' => false,
]

useComments(false)
```

```
use App\Listeners\DoWhatEver;
use Marshmallow\NovaActivity\Events\ActivityCreated;
protected $listen = [
    ActivityCreated::class => [
        DoWhatEver::class
    ],
];

// Listeners
class DoWhatEver
{
    public function handle($event)
    {
        /** Get the model on which the activity was created. */
        $event->model;

        /** Get the created activity. */
        $event->activity;

        /** Check if this activity has any mentions. */
        $event->activity->hasMentions();

        /** Get a collection of all the classes that where mentioned. */
        $event->activity->getMentions();
    }
}
```

Events
------

[](#events)

```
$event = ActivityCreated::class;
$activity = $event->activity;
$model = $event->activity->novaActivity;
```

```
$event = QuickReplyChanged::class;
$activity = $event->activity;
$model = $event->activity->novaActivity;
$user = $event->user;
```

```
$event = ActivityPinned::class;
$activity = $event->activity;
$model = $event->activity->novaActivity;
$user = $event->user;
```

```
$event = ActivityUnpinned::class;
$activity = $event->activity;
$model = $event->activity->novaActivity;
$user = $event->user;
```

```
$event = ActivityCommentHidden::class;
$activity = $event->activity;
$model = $event->activity->novaActivity;
$user = $event->user;
```

```
$event = ActivityCommentShow::class;
$activity = $event->activity;
$model = $event->activity->novaActivity;
$user = $event->user;
```

```
$event = ActivityDeleted::class;
$activity = $event->activity;
$model = $event->activity->novaActivity;
$user = $event->user;
```

```
/** Add this so the index button will work. */
public static $clickAction = 'ignore';
```

```
->dateFormat('Do MMM, YYYY')
->useHumanReadableDates(true)
->useQuickReplies(true)
->useFileUploads(true)
```

```
->actions([
    ToggleTagAction::make(__('Important'), 'important')
        ->color('red')
        ->backgroundColor('#ffffff')
        ->borderColor('red')
        ->icon('fire'),
])
```

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance69

Regular maintenance activity

Popularity19

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 78.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~35 days

Recently: every ~59 days

Total

21

Last Release

181d ago

Major Versions

v0.0.11 → v1.0.02024-08-16

v1.0.0 → v5.0.02025-03-02

v1.0.1 → v5.2.02025-08-07

PHP version history (2 changes)v0.0.2PHP ^7.3|^8.0

v5.0.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/be33d2624e24c516e73892b0929447cc762f3622c024ab8d0d2a59042e5d2c7f?d=identicon)[marshmallow](/maintainers/marshmallow)

---

Top Contributors

[![stefvanesch](https://avatars.githubusercontent.com/u/46725619?v=4)](https://github.com/stefvanesch "stefvanesch (66 commits)")[![LTKort](https://avatars.githubusercontent.com/u/2412670?v=4)](https://github.com/LTKort "LTKort (18 commits)")

---

Tags

laravelnova

### Embed Badge

![Health badge](/badges/marshmallow-nova-activity/health.svg)

```
[![Health](https://phpackages.com/badges/marshmallow-nova-activity/health.svg)](https://phpackages.com/packages/marshmallow-nova-activity)
```

###  Alternatives

[optimistdigital/nova-sortable

This Laravel Nova package allows you to reorder models in a Nova resource's index view using drag &amp; drop.

2872.1M6](/packages/optimistdigital-nova-sortable)[outl1ne/nova-sortable

This Laravel Nova package allows you to reorder models in a Nova resource's index view using drag &amp; drop.

2861.8M9](/packages/outl1ne-nova-sortable)[optimistdigital/nova-multiselect-field

A multiple select field for Laravel Nova.

3403.5M7](/packages/optimistdigital-nova-multiselect-field)[outl1ne/nova-settings

A Laravel Nova tool for editing custom settings using native Nova fields.

296883.2k3](/packages/outl1ne-nova-settings)[optimistdigital/nova-menu-builder

This Laravel Nova package allows you to create and manage menus and menu items.

243369.4k](/packages/optimistdigital-nova-menu-builder)[outl1ne/nova-menu-builder

This Laravel Nova package allows you to create and manage menus and menu items.

243246.0k3](/packages/outl1ne-nova-menu-builder)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
