PHP code example of emiliogrv / nova-batch-load

1. Go to this page and download the library: Download emiliogrv/nova-batch-load 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/ */

    

emiliogrv / nova-batch-load example snippets


// in your Nova's Resources

// ...
use Emiliogrv\NovaBatchLoad\BatchLoadField;
// ...

public function fields(Request $request)
{
    return [
        // ...

        BatchLoadField::make()
            ->accept('.xlsx') // Optional
            ->defaultTabActive(1) // Optional
            ->ignoreAttributes('some_attribute_name') // Optional
            ->keepOriginalFields('belongs|select|boolean'), // Optional

        // ...
    ];
}