Download the PHP package dev-pirate/lara-excel-craft without Composer
On this page you can find all versions of the php package dev-pirate/lara-excel-craft. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dev-pirate/lara-excel-craft
More information about dev-pirate/lara-excel-craft
Files in dev-pirate/lara-excel-craft
Package lara-excel-craft
Short Description Laravel package to export / import excel sheets
License MIT
Informations about the package lara-excel-craft
LaraExcelCraft
LaraExcelCraft is a Laravel package for importing/exporting Excel file into database tables easily step by step with nice UI, using antd components, ReactJs and phpoffice/phpspreadsheet.
Install via composer
Run the following command to pull in the latest version:
Publish the config
Run the following command to publish the package config file:
You should now have a config/lara-excel-craft.php file that allows you to configure the basics of this package.
Add Routes
Add this code inside your route file:
Add View
-
Add the import component to your view :
- Add the export component to your view :
Custom Excel Import
Before continuing, make sure you have installed the package as per the installation instructions for Laravel.
Update your User model
Firstly you need to implement the DevPirate\LaraExcelCraft\Interfaces\ExcelManager interface on your model, which require a custom data importing logic, you implement the 3 methods importDataFromExcel(array $data) and getImportableFields() and exportDataToExcel().
The example below should give you an idea of how this could look. Obviously you should make any changes, as necessary, to suit your own needs.
Config File
Let's review some of the options in the config/lara-excel-craft.php file that we published earlier.
First up is:
.
License
All versions of lara-excel-craft with dependencies
barryvdh/laravel-cors Version *
phpoffice/phpspreadsheet Version ^1.29
ext-json Version *