Download the PHP package nero/backpack-export without Composer
On this page you can find all versions of the php package nero/backpack-export. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package backpack-export
Introduction
There is a problem with exporting data from pages in Backpack, it exports only the data that you see on page, and it's limited up to 100 rows.
So the main purpose of this package is to allow you to export not only data you see on page but all rows. Also, it works even if you have applied filters.
The export based on job. After the export (job) is done, it will send a letter to user's email. But if you want, you can override this logic and set your own Notification class, it can be done with changing config (backpack_export.php).
I recommend to check the config out, it can be found in config of your application (config/backpack_export.php)
Install
To install this package, you have to run this command:
Next step is to run:
As result of command, there will be 2 files added in your application:
- in app/config, there will be
backpack_export.php
config - in your resource/views/vendor/backpack/crud/inc, there will be
export_buttons.blade.php
How to use
After installing you have to make 3 steps:
- Go to the crud class where you want to enable an export
-
Include
Nero\BackpackExport\Application\Traits\ExportOperation
trait. Example: - Go to the setupListOperation and call
enableAdvancedExportButtons
method:
IMPORTANT: You MUST call either
$this->crud->enableExportButtons();
or$this->enableAdvancedExportButtons();
, but not both!
It's done!. Now you can export all data from table, not only the displayed ones
Uninstall
Uninstalling process is not complicated. It consists of two steps:
- removing package from composer
- removing config, views and language files
To remove package, execute this command
Then we have to delete config. It can be found in config, full path config/backpack_export.php
:
Now we have to delete export_buttons.blade.php
. It can be found as resource/views/vendor/backpack/crud/inc/export_buttons.blade.php
:
As last step is deleting language packages:
TODO
- [x] Write a better documentation
- [ ] Make PDF compatibility
- [ ] Improve handling custom_html columns
- [ ] Refactoring code
- [x] Fix fetch in view (list.blade.php)
- [x] Remove unnecessary code
- [x] Convert date format in row ("Monday 11 December 2023 14:00:00") to application chosen format
- [x] Agility to except any columns from export
All versions of backpack-export with dependencies
backpack/crud Version ^5.4
phpoffice/phpspreadsheet Version ^1.29
anourvalar/eloquent-serialize Version ^1.2