PHPackages                             bennyvdhoogen/nova-codesnippet - 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. bennyvdhoogen/nova-codesnippet

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

bennyvdhoogen/nova-codesnippet
==============================

A Laravel Nova Code Snippet field.

1.1(4y ago)01.5kMITVuePHP &gt;=7.1.0

Since Jul 2Pushed 4y ago1 watchersCompare

[ Source](https://github.com/bennyvdhoogen/nova-codesnippet)[ Packagist](https://packagist.org/packages/bennyvdhoogen/nova-codesnippet)[ RSS](/packages/bennyvdhoogen-nova-codesnippet/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (2)DependenciesVersions (4)Used By (0)

Codesnippet field for Nova
==========================

[](#codesnippet-field-for-nova)

This packages adds a `Codesnippet` custom field for use in your Nova applications. The Codesnippet field is an explainer field suited to provide in-context information during resource creation and update.

Simply add a Codesnippet field, per the usual Nova format:

```
Codesnippet::make('example-code', '
    public function example(){
        return "Whatever works!";
    }
')
```

The field can also be displayed conditionally. This can be done by supplying the literal field name and value to check.

```
Codesnippet::make('example-code', '
    public function example(){
        return "Whatever works!";
    }
', 'event', 'DonationCreated')
```

Demonstration
=============

[](#demonstration)

[![Demonstration how to use Codesnippet field](explanation.gif)](explanation.gif)

Thanks to
---------

[](#thanks-to)

This packages depends on the `Prism` and `vue-code-highlight` packages for syntax highlighting. All credits in that regard go to the maintainers of those packages.

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~2 days

Total

3

Last Release

1823d ago

Major Versions

0.1 → 1.02021-07-02

### Community

Maintainers

![](https://www.gravatar.com/avatar/84af35bd8a2fecff2cee9b1a2ff9aa175381a8b135f7f24ea773633224ec94a5?d=identicon)[bennyvdhoogen](/maintainers/bennyvdhoogen)

---

Top Contributors

[![bennyvdhoogen](https://avatars.githubusercontent.com/u/70586325?v=4)](https://github.com/bennyvdhoogen "bennyvdhoogen (4 commits)")

---

Tags

customfieldlaravelnovalaravelfieldnovacode snippet

### Embed Badge

![Health badge](/badges/bennyvdhoogen-nova-codesnippet/health.svg)

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

###  Alternatives

[timothyasp/nova-color-field

A Laravel Nova Color Picker field.

771.7M6](/packages/timothyasp-nova-color-field)[inspheric/nova-defaultable

Default values for Nova fields when creating resources and running resource actions.

52178.7k1](/packages/inspheric-nova-defaultable)[optimistdigital/nova-notes-field

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

52145.0k](/packages/optimistdigital-nova-notes-field)[outl1ne/nova-color-field

A Laravel Nova Color Picker field.

26263.8k](/packages/outl1ne-nova-color-field)[wemersonrv/input-mask

A Laravel Nova custom field text with masks on input

1198.4k](/packages/wemersonrv-input-mask)

PHPackages © 2026

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