marshmallow/nova-tool-data-importer

A fully-fledged Excel & CSV import tool for Laravel Nova. The importer will use your own validation rules on every row. It can run in browser and in queued jobs. When running as a job, events will fire to let you know what is happening.

v1.0.1 2021-04-07 10:43 UTC

README

alt text

Marshmallow Laravel Nova Importer

Version Issues Licence PHP Syntax Checker

Import data to your Laravel Nova models. You can use jobs if you're expecting large files.

See it in action in a GIF

Installation

You can install the package via composer:

composer require marshmallow/nova-data-importer

The importer needs to have a table to store some data so please run a migration.

php artisan migrate

Usage

In app/Providers/NovaServiceProvider.php you need to add the Import tool.

public function tools()
{
    return [
        ...
        new \Marshmallow\NovaDataImporter\NovaDataImporter,
    ];
}

Set up queues (optional)

First, we need to make sure you are able to run queues. If you are already running queues you don't have to change your current behaviour.

Prepare your application to handle queues from the database. Skip this if you already have queues set up.

php artisan queue:table
php artisan migrate

Update your .env file first:

QUEUE_CONNECTION=database

BROADCAST_DRIVER=pusher

PUSHER_APP_ID=XXX
PUSHER_APP_KEY=XXX
PUSHER_APP_SECRET=XXX
PUSHER_APP_CLUSTER=eu

Last; Inside your config/app.php uncomment the line below if it is still commented.

[
   'providers' => [

        /*
         * Laravel Framework Service Providers...
         */
        Illuminate\Broadcasting\BroadcastServiceProvider::class,
    ],
]

Start your worker and you're good to go!

php artisan queue:work --queue=default

Options

If you want to override some of the default options, you need to publish the config file with php artisan vendor:publish.

Changelog

Please see CHANGELOG for more information what has changed recently.

Security

If you discover any security related issues, please email stef@marshmallow.dev instead of using the issue tracker.

Credits

License

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