PHPackages                             outl1ne/nova-notes-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. outl1ne/nova-notes-field

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

outl1ne/nova-notes-field
========================

This Laravel Nova package adds a notes field to Nova's arsenal of fields.

4.0.0(1y ago)52127.3k↓18.4%40[2 issues](https://github.com/outl1ne/nova-notes-field/issues)[1 PRs](https://github.com/outl1ne/nova-notes-field/pulls)MITPHPPHP &gt;=8.0CI failing

Since Oct 22Pushed 1y ago4 watchersCompare

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

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

Nova Notes Field
================

[](#nova-notes-field)

[![Latest Version on Packagist](https://camo.githubusercontent.com/9bb1fda545571358b750e8bb26129afc70ef2d6abf640fadb4d18dae729ef7a2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f75746c316e652f6e6f76612d6e6f7465732d6669656c642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/outl1ne/nova-notes-field)[![Total Downloads](https://camo.githubusercontent.com/b07fdd6c768e3745f6623b4768ea8fbf2959731dd19512329d4071008c0effc0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6f75746c316e652f6e6f76612d6e6f7465732d6669656c642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/outl1ne/nova-notes-field)

This [Laravel Nova](https://nova.laravel.com) package adds a notes field to Nova's arsenal of fields.

Requirements
------------

[](#requirements)

- `php: >=8.0`
- `laravel/nova: ^4.0`

Features
--------

[](#features)

- Notes field on Detail view
- Differentiation between user-added and system-added notes
- Ability to add notes through the UI or programmatically
- Ability to edit user-made notes
- Ability to delete user-made notes (w/ confirmation modal)
- Customizable placeholder support
- Set ability to hide or show the 'Add Note' button

Screenshots
-----------

[](#screenshots)

[![Detail view](docs/detail.png)](docs/detail.png)

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

[](#installation)

```
# Install the package via Composer
composer require outl1ne/nova-notes-field

# Run automatically loaded migration(s)
php artisan migrate
```

Usage
-----

[](#usage)

Add `HasNotes` trait to the model that has the notes:

```
use Outl1ne\NovaNotesField\Traits\HasNotes;

class ExampleModel extends Model
{
    use HasNotes;
}
```

Add `NotesField` to the matching resource:

```
use Outl1ne\NovaNotesField\NotesField;

class SomeResource extends Resource
{
  // ...

  public function fields(Request $request)
  {
    return [
      // ...
      NotesField::make('Notes')
        ->placeholder('Add note') // Optional
        ->addingNotesEnabled(false) // Optional
        ->fullWidth(), // Optional
    ]
  }
}
```

Adding notes programmatically
-----------------------------

[](#adding-notes-programmatically)

To add notes programmatically, use the method provided by the `HasNotes` trait:

```
/**
 * Creates a new note and attaches it to the model.
 *
 * @param string $note The note text which can contain raw HTML.
 * @param bool $user Enables or disables the use of `Auth::guard(config('nova.guard'))->user()` to set as the creator.
 * @param bool $system Defines whether the note is system created and can be deleted or not.
 * @return \Outl1ne\NovaNotesField\Models\Note
 **/
public function addNote($note, $user = true, $system = true)
```

Editing notes programmatically
------------------------------

[](#editing-notes-programmatically)

To edit notes programmatically, use the `editNote` method provided by the `HasNotes` trait:

```
/**
 * Edit a note with the given ID and text.
 *
 * @param int|string $noteId The ID of the note to edit.
 * @param string $text The note text which can contain raw HTML.
 * @return \Outl1ne\NovaNotesField\Models\Note
 **/
public function editNote($noteId, $text)
```

*Alternatively, you can simply update an existing Note record that's already in memory via standard Eloquent methods:*

```
$note = $notable->notes()->where('id', '=', $noteId)->first();

$note->update([
    'text' => $noteText,
]);

// Or...
$note->text = $noteText;
$note->save();
```

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

[](#configuration)

### Publish configuration

[](#publish-configuration)

You can publish the configuration by running:

```
php artisan vendor:publish --provider="Outl1ne\NovaNotesField\NotesFieldServiceProvider" --tag="config"
```

The available configuration option(s):

ConfigTypedescriptionget\_avatar\_urlcallable or stringEither enter the url attribute name on your model or a callable which allows you to generate your own URL for the user. The input parameter is the user model. By default, Gravatar is used for the user's avatars.table\_namestringOptionally provide your own table name for the notes table. Default is `nova_notes`.notes\_modelstringOptionally provide your own Note model.use\_trix\_inputbooleanOptionally enable Trix WYSIWYG input by setting this to `true`.full\_width\_inputsbooleanOptionally force all notes fields to display in full width.display\_orderstringOptionally set the sort order for notes. Default is `DESC`.Custom edit &amp; delete authorization
--------------------------------------

[](#custom-edit--delete-authorization)

By default, only the user that wrote the note can edit/delete it and no one can edit/delete system notes.

You can define which user(s) can edit/delete which notes by defining a new Laravel authorization Gate called `edit-nova-note` and `delete-note-note` respectively.

In your `AuthServiceProvider.php` add a Gate definition like so:

```
use Illuminate\Support\Facades\Gate;
use Outl1ne\NovaNotesField\Models\Note;

// ...

public function boot()
{
  Gate::define('edit-nova-note', function ($user, Note $note) {
    // Do whatever here to add custom edit authorization logic, ie:
    return $note->created_by === $user->id || $user->isAdmin;
  });
  Gate::define('delete-nova-note', function ($user, Note $note) {
    // Do whatever here to add custom delete authorization logic, ie:
    return $note->created_by === $user->id || $user->isAdmin;
  });
}
```

Localization
------------

[](#localization)

The translation file(s) can be published by using the following publish command:

```
php artisan vendor:publish --provider="Outl1ne\NovaNotesField\NotesFieldServiceProvider" --tag="translations"
```

You can add your translations to `resources/lang/vendor/nova-notes-field/` by creating a new translations file with the locale name (ie `se.json`) and copying the JSON from the existing `en.json`.

Publishing migrations (optional)
--------------------------------

[](#publishing-migrations-optional)

If you want to edit the migration(s), you can publish the migrations like so:

```
php artisan vendor:publish --provider="Outl1ne\NovaNotesField\NotesFieldServiceProvider" --tag="migrations"
```

Credits
-------

[](#credits)

- [Tarvo Reinpalu](https://github.com/Tarpsvo)

License
-------

[](#license)

This project is open-sourced software licensed under the [MIT license](LICENSE.md).

###  Health Score

51

—

FairBetter than 96% of packages

Maintenance42

Moderate activity, may be stable

Popularity48

Moderate usage in the ecosystem

Community23

Small or concentrated contributor base

Maturity74

Established project with proven stability

 Bus Factor1

Top contributor holds 79.1% 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 ~65 days

Recently: every ~183 days

Total

31

Last Release

451d ago

Major Versions

1.5.8 → 2.0.02020-12-15

2.0.3 → 3.0.02022-08-11

3.1.0 → 4.0.02025-02-22

PHP version history (3 changes)1.0.0PHP &gt;=7.1.0

2.0.0PHP &gt;=7.2.0

3.0.0PHP &gt;=8.0

### Community

Maintainers

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

---

Top Contributors

[![Tarpsvo](https://avatars.githubusercontent.com/u/2018660?v=4)](https://github.com/Tarpsvo "Tarpsvo (148 commits)")[![SimonBarrettACT](https://avatars.githubusercontent.com/u/57679318?v=4)](https://github.com/SimonBarrettACT "SimonBarrettACT (17 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (10 commits)")[![richard-raadi](https://avatars.githubusercontent.com/u/69033947?v=4)](https://github.com/richard-raadi "richard-raadi (4 commits)")[![adriandmitroca](https://avatars.githubusercontent.com/u/3842935?v=4)](https://github.com/adriandmitroca "adriandmitroca (3 commits)")[![Meuss](https://avatars.githubusercontent.com/u/10962824?v=4)](https://github.com/Meuss "Meuss (1 commits)")[![malaquiasd](https://avatars.githubusercontent.com/u/12930056?v=4)](https://github.com/malaquiasd "malaquiasd (1 commits)")[![LorenzoSapora](https://avatars.githubusercontent.com/u/25519274?v=4)](https://github.com/LorenzoSapora "LorenzoSapora (1 commits)")[![steven-fox](https://avatars.githubusercontent.com/u/62109327?v=4)](https://github.com/steven-fox "steven-fox (1 commits)")[![lechbaczynski](https://avatars.githubusercontent.com/u/1127623?v=4)](https://github.com/lechbaczynski "lechbaczynski (1 commits)")

---

Tags

laravelfieldnovaoutl1ne

### Embed Badge

![Health badge](/badges/outl1ne-nova-notes-field/health.svg)

```
[![Health](https://phpackages.com/badges/outl1ne-nova-notes-field/health.svg)](https://phpackages.com/packages/outl1ne-nova-notes-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.

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-notes-field

This Laravel Nova package adds a notes field to Nova's arsenal of fields.

52139.5k](/packages/optimistdigital-nova-notes-field)[outl1ne/nova-simple-repeatable

A Laravel Nova simple repeatable rows field.

74356.3k](/packages/outl1ne-nova-simple-repeatable)[optimistdigital/nova-simple-repeatable

A Laravel Nova simple repeatable rows field.

74151.2k](/packages/optimistdigital-nova-simple-repeatable)[alexwenzel/nova-dependency-container

A Laravel Nova 4 form container for grouping fields that depend on other field values.

461.0M2](/packages/alexwenzel-nova-dependency-container)

PHPackages © 2026

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