soap/livewire-excel-import

Large Excel file import using Laravel Livewire

dev-main 2023-07-03 07:10 UTC

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Larage Excel file import using Laravel Livewire. Support drag and drop file upload and attributes mapping as well as realtime import progress report.

Support us

Installation

You can install the package via composer:

composer require soap/livewire-excel-import

You can publish and run the migrations with:

php artisan vendor:publish --tag="livewire-excel-import-migrations"
php artisan migrate

You can publish the config file with:

php artisan vendor:publish --tag="livewire-excel-import-config"

This is the contents of the published config file:

return [
    
    /**
     * Options: tailwind | bootstrap-4 | bootstrap-5.
     */
    'theme' => 'tailwind',
];

Optionally, you can publish the views using

php artisan vendor:publish --tag="livewire-excel-import-views"

Usage

In your desired view, put the following livewire component.

@livewire('excel-importer', [
    'model' => App\Models\User::class, 
    'importer' => App\Imports\UsersImport::class
    ])

Testing

composer test

🔧 Supported Versions

Versions will be supported for a limited amount of time.

Version Laravel Version PHP Version Support
1.0 >=9.0 ^8.1 First Release

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

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