PHPackages                             mateusz-peczkowski/nova-heartbeat-resource-field - 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. mateusz-peczkowski/nova-heartbeat-resource-field

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

mateusz-peczkowski/nova-heartbeat-resource-field
================================================

Heartbeat for resources to block editing same resource with 2 or more people

1.0.6(1y ago)34.2k↓28.5%MITPHPPHP &gt;=8.0

Since Jun 29Pushed 1y ago1 watchersCompare

[ Source](https://github.com/mateusz-peczkowski/nova-heartbeat-resource-field)[ Packagist](https://packagist.org/packages/mateusz-peczkowski/nova-heartbeat-resource-field)[ RSS](/packages/mateusz-peczkowski-nova-heartbeat-resource-field/feed)WikiDiscussions master Synced today

READMEChangelog (7)Dependencies (2)Versions (8)Used By (0)

[![NovaHeartbeatResourceField](https://github.com/mateusz-peczkowski/nova-heartbeat-resource-field/raw/master/media/cover.jpeg?raw=true)](https://github.com/mateusz-peczkowski/nova-heartbeat-resource-field/blob/master/media/cover.jpeg?raw=true)

Heartbeat Resource Field
========================

[](#heartbeat-resource-field)

This package provides a custom Nova field that will like heartbeat monitor watch who is editing currently the resource.

On a listing/details there will be information who is currently editing and as well another person will be blocked from editing the same resource to not overlap changes.

Package is made for Laravel Nova ^4 and it works as well with Laravel Nova ^5.

 [![](https://github.com/mateusz-peczkowski/nova-heartbeat-resource-field/raw/master/media/img-1.png?raw=true)](https://github.com/mateusz-peczkowski/nova-heartbeat-resource-field/blob/master/media/img-1.png?raw=true) [![](https://github.com/mateusz-peczkowski/nova-heartbeat-resource-field/raw/master/media/img-2.png?raw=true)](https://github.com/mateusz-peczkowski/nova-heartbeat-resource-field/blob/master/media/img-2.png?raw=true) [![](https://github.com/mateusz-peczkowski/nova-heartbeat-resource-field/raw/master/media/img-3.png?raw=true)](https://github.com/mateusz-peczkowski/nova-heartbeat-resource-field/blob/master/media/img-3.png?raw=true)

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require mateusz-peczkowski/nova-heartbeat-resource-field
```

### Migrations

[](#migrations)

After installation, you need to run the migration to create the table that will store the heartbeat data.

```
php artisan migrate
```

### Publish package (optional)

[](#publish-package-optional)

Publish the configuration file to customize the settings of the package (check bellow for more details).

```
php artisan vendor:publish --provider="MateuszPeczkowski\NovaHeartbeatResourceField\HeartbeatResourceServiceProvider"
```

Configuration
-------------

[](#configuration)

The package provides a configuration file that allows you to customize the settings of the package.

```
return [
    'table_name'            => 'nova_heartbeats',
    'heartbeat_model'       => \MateuszPeczkowski\NovaHeartbeatResourceField\Models\HeartbeatResource::class,
    'heartbeat_interval'    => env('NOVA_HEARTBEAT_INTERVAL', 5 * 1000), // 5 seconds
    'heartbeat_timeout'     => env('NOVA_HEARTBEAT_TIMEOUT', 60 * 1000), // 1 minute
    'heartbeat_guard'       => 'web',
    'heartbeat_guard_name'  => 'name',
    'heartbeat_guard_email' => 'email',
    'heartbeat_avatar_url'  => null,
];
```

Usage
-----

[](#usage)

### Nova Resource Field

[](#nova-resource-field)

To install this field in your Nova resource, you need to add the following code to the `fields` method of your resource.

```
use MateuszPeczkowski\NovaHeartbeatResourceField\NovaHeartbeatResourceField;

NovaHeartbeatResourceField::make('Heartbeat')
    ->resourceId($this->id),
```

Optionally you can allow to retake the resource by adding the following code

```
use MateuszPeczkowski\NovaHeartbeatResourceField\NovaHeartbeatResourceField;

NovaHeartbeatResourceField::make('Heartbeat')
    ->resourceId($this->id)
    ->allowRetake(),
```

Then on details view you will have additional button to retake the resource.

### Nova Resource Trait

[](#nova-resource-trait)

Add this trait to your Nova resource

```
use MateuszPeczkowski\NovaHeartbeatResourceField\Traits\HasNovaHeartbeats;

class YourResource extends Resource
{
    use HasNovaHeartbeats;
}
```

### Model Trait

[](#model-trait)

Add this trait to your Model

```
use MateuszPeczkowski\NovaHeartbeatResourceField\Traits\HasHeartbeats;

class YourModel extends Model
{
    use HasHeartbeats;
}
```

### Clearing expired heartbeats (recommended)

[](#clearing-expired-heartbeats-recommended)

In case of failure of removing the heartbeat, you can use the following command to remove all the heartbeats that are older than the timeout.

```
$schedule->command('heartbeat:clear-expired')->everyMinute();
```

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance37

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

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 ~29 days

Recently: every ~43 days

Total

7

Last Release

564d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/cad64d66699c7a99f436394802c882fd2dd6abe798a5423c21ba8d8ae2b35e51?d=identicon)[mateusz-peczkowski](/maintainers/mateusz-peczkowski)

---

Tags

laravelfieldnovamateusz-peczkowski

### Embed Badge

![Health badge](/badges/mateusz-peczkowski-nova-heartbeat-resource-field/health.svg)

```
[![Health](https://phpackages.com/badges/mateusz-peczkowski-nova-heartbeat-resource-field/health.svg)](https://phpackages.com/packages/mateusz-peczkowski-nova-heartbeat-resource-field)
```

###  Alternatives

[optimistdigital/nova-sortable

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

2852.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.

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

A multiple select field for Laravel Nova.

3453.7M8](/packages/optimistdigital-nova-multiselect-field)[outl1ne/nova-simple-repeatable

A Laravel Nova simple repeatable rows field.

74404.9k](/packages/outl1ne-nova-simple-repeatable)[markwalet/nova-modal-response

A Laravel Nova asset for Modal responses on an action.

17878.9k](/packages/markwalet-nova-modal-response)[outl1ne/nova-page-manager

Page(s) and region(s) manager for Laravel Nova.

17947.0k](/packages/outl1ne-nova-page-manager)

PHPackages © 2026

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