A Laravel Nova package that allows you to dynamically append inputs to your resources.

1.0.0 2021-03-25 22:59 UTC

This package is auto-updated.

Last update: 2021-04-25 23:11:39 UTC


A laravel nova package that allows you to dynamically append inputs to your resources based on a database table.


composer require crayon/nova-additional-fields


Assuming you are building an eCommerce website, and you have different types of products. It would be uncomfortable if you want the admin of the website to enter custom values for each product.

So this package allows you to define form inputs in a Nova resource;


Product fields (Each field belongs to a category):

Schema::create('product_fields', function (Blueprint $table) {


Resource Usage

The additional fields will be loaded from an endpoint (Fields that belong to the category we selected)

AdditionalFields::make('Additional Fields', 'fields')



Route::get('/category/{category}/fields', [\App\Http\Controllers\Api\NovaHelpers\NovaCategoryController::class, 'fields']);


 * Get available fields by Category ID
 * @param $category
 * @return mixed
public function fields($category)
    return Category::findOrFail($category)->fields->map(fn($field) => [
        'id' => $field->id,
        'text' => $field->text,
        'type' => $field->type,
        'name' => $field->name,
        'options' => $field->options

The fields will be loaded into your resource based on the ones you added to your database. ProductFields resource find it here


nova-additional-fields nova-additional-fields


Laravel Nova is a great piece of software that will boost your productivity when it comes to building admin panels. With a little of customization through custom packages & fields. You are ready to rock 'N roll.