A Laravel package that encrypts one or more columns from a table and export them into CSV.
This package was tested using php 8.1
and laravel 10.0
You can install the package via composer:
composer require mrshoikot/securecsv:dev-main"
use Mrshoikot\EncryptAndExport\EncryptAndExport;
$exporter = new EncryptAndExport();
$exporter->setTable('TABLE_NAME');
$exporter->selectColumn('COLUMN_NAME');
$exporter->setPath(storage_path('exports')); // Default is /storage/app
$exporter->export();
The selectColumn()
method also accepts array of column names.
To use the package from command line. You have to run
php artisan securecsv
A prompt will ask you from which table you want to export the data and also ask you to choose the columns you want to encrypt. You'll also be asked the path where the exported CSV file should be stored. The default is the root directory of your project.
composer test
-
Implement API usability along with CLI -
Write unit and more feature tests - Enable and test support for older versions of PHP and Laravel
- Include option for having CSV header
- Add ability for selecting multiple column at once
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.