How to auto populate Laravel Nova Action Fields with their respective values from database?

  laravel, laravel-nova

This is the code I have inside my Action Class:

public function fields()
{
    return [
        Date::make('checkin_date'),
        Date::make('checkout_date'),
        Textarea::make('remark'),
        Text::make('holder_name'),
        Text::make('holder_surname'),
        Text::make('clientReference'),
    ];
}

.

What I’m looking for is to show the actual database value on each field. So a user would either choose to edit or keep values as they are.

Source: Laravel

Leave a Reply