PHP code example of sparclex / nova-import-card

1. Go to this page and download the library: Download sparclex/nova-import-card 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/ */

    

sparclex / nova-import-card example snippets


// in app/Providers/NovaServiceProvider.php or app/Nova/<Resource>.php

// ...

public function card()
{
    return [
        // ...
        new \Sparclex\NovaImportCard\NovaImportCard(\App\Nova\User::class),
    ];
}

// app/Nova/User.php

class User extends Resource
{

    public static $importer = CustomImporter::class;
    
    // ...
}

// or app/config/nova-import-card.php

return [
    'importer' => CustomImporter::class,
    
    // ...
]