chinleung/nova-autofill

Autofill values for Laravel Nova fields based on the parent model on creation.
13,347 6
Install
composer require chinleung/nova-autofill
Latest Version:v1.1.2
PHP:>=7.2.0
Laravel:5 – 9
License:MIT
Last Updated:Aug 21, 2026
Links: GitHub  ·  Packagist
Maintainer: ChinLeung

Nova Autofill

Auto prefill values for Laravel Nova fields based on the parent model.

Installation

You can install the package via composer:

composer require chinleung/nova-autofill

Usage

If your model has a relationship, it can autofill some values when adding via a relationship in Laravel Nova. For instance, an order that belongs to a user, you can autofill the user's address when adding a new order via the user resource.

public function fields(Request $request)
{
    return [
        Text::make('Shipping Address Line 1')
            ->autofill(),
    ];
}

If no attribute is passed in the method, it will use the field's attribute name to fetch from the parent resource. However, you can specify the attribute to fill from:

public function fields(Request $request)
{
    return [
        Text::make('Shipping Address Line 1')
            ->autofill('address_line_1'),
    ];
}

Security

If you discover any security related issues, please email hello@chinleung.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

Related Packages

epartment/nova-dependency-container

A Laravel Nova field container allowing to depend on other fields values

4,685,986 378
eminiarts/nova-tabs

Laravel Nova - Tabs.

4,590,384 464
ebess/advanced-nova-media-library

Laravel Nova tools for managing the Spatie media library.

3,829,438 616
spatie/nova-tags-field

A tags field for Nova apps

2,320,736 301
kabbouchi/nova-impersonate

A Laravel Nova field allows you to authenticate as your users.

2,260,164 234

Version History

Version Released PHP Laravel License
v1.1.2 >=7.2.0 ^5.6|^6.0|^7.0|^8.0|^9.0 MIT
v1.1.1 >=7.2.0 ^5.6|^6.0|^7.0|^8.0 MIT
v1.1.0 >=7.2.0 ^5.6|^6.0|^7.0|^8.0 MIT
v1.0.0 >=7.2.0 ^5.6|^6.0 MIT