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 today

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 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

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

1769d 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.

781.6M5](/packages/timothyasp-nova-color-field)[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)[simplesquid/nova-enum-field

A Laravel Nova field to add enums to resources.

52391.9k2](/packages/simplesquid-nova-enum-field)[outhebox/nova-hidden-field

A Laravel Nova Hidden field.

33562.2k1](/packages/outhebox-nova-hidden-field)[sietse85/nova-button

(Nova 4+) A Laravel Nova package for adding buttons to your resources.

37347.3k](/packages/sietse85-nova-button)[nikaia/nova-rating-field

Add start rating field to Laravel Nova

42258.6k](/packages/nikaia-nova-rating-field)

PHPackages © 2026

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