PHP code example of ngiraud / nova-header-field

1. Go to this page and download the library: Download ngiraud/nova-header-field library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

ngiraud / nova-header-field example snippets


public function fields(Request $request)
    {
        return [
            (new Panel(__('General'), [

                FormHeader::make(__('General')),

                Text::make(__('Firstname'), 'firstname'),
                Text::make(__('Lastname'), 'lastname'),
                Text::make(__('Email'), 'email'),
                ...
            ]))->withToolbar(),

            new Panel(__('Address'), [

                FormHeader::make(__('Address')),

                Text::make(__('Address 1'), 'address_1'),
                Text::make(__('Address 2'), 'address_2'),
                Text::make(__('Postal Code'), 'postal_code'),
                Text::make(__('City'), 'city'),
                Text::make(__('Country'), 'country'),
                ...
            ]),
        ];
    }