dzorogh/nova-card-data-update

A universal Laravel Nova card to update data with Excel file.

1.1.1 2022-02-21 14:49 UTC

This package is auto-updated.

Last update: 2024-03-23 14:24:59 UTC


README

image

Useful card for Laravel Nova, when you need data editing interface with a lot of mass update actions. In this situation, import/export to xlsx files is good option. This card provides two simple actions:

  1. Run excel export script and download file
  2. Upload file and run import file

Installation

composer require dzorogh/nova-card-excel-data-update

Also, you must have imports and exports from popular package Laravel Excel:

composer require maatwebsite/excel

More docs: https://docs.laravel-excel.com/3.1/getting-started/installation.html

Usage

It can be used everywhere in Laravel Nova where any other card can be used.

For example, in app/Nova/NovaServiceProvider.php to show card at dashboard:

    use Dzorogh\ExcelDataUpdate\ExcelDataUpdate;
    
    /**
     * Get the cards that should be displayed on the default Nova dashboard.
     *
     * @return array
     */
    protected function cards()
    {
        return [
            new ExcelDataUpdate(new ExportClass, new ImportClass)
        ];
    }

ExportClass and ImportClass are described here: https://docs.laravel-excel.com/

Todo

  • English translation
  • Uploading results
  • Percents on upload and edit
  • Instructions how to use with queues
  • Export/Import errors