LaravelPackages.net
Acme Inc.
Toggle sidebar
bennyvdhoogen/nova-codesnippet

A Laravel Nova Code Snippet field.

1.498
0
1.1
About bennyvdhoogen/nova-codesnippet

bennyvdhoogen/nova-codesnippet is a Laravel package for a laravel nova code snippet field.. It currently has 0 GitHub stars and 1.498 downloads on Packagist (latest version 1.1). Install it with composer require bennyvdhoogen/nova-codesnippet. Discover more Laravel packages by bennyvdhoogen or browse all Laravel packages to compare alternatives.

Last updated

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 how to use Codesnippet field

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.

Comments