mrshoikot / securecsv
A Laravel package that encrypts one or more columns from a table and export them into CSV
Requires
- php: ^8.1
- illuminate/contracts: ^10.0
- spatie/laravel-package-tools: ^1.14.0
Requires (Dev)
- laravel/pint: ^1.0
- nunomaduro/collision: ^7.9
- nunomaduro/larastan: ^2.0.1
- orchestra/testbench: ^8.0
- pestphp/pest: ^2.0
- pestphp/pest-plugin-arch: ^2.0
- pestphp/pest-plugin-laravel: ^2.0
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
- spatie/laravel-ray: ^1.26
This package is auto-updated.
Last update: 2024-04-09 12:29:40 UTC
README
A Laravel package that encrypts one or more columns from a table and export them into CSV.
Environment
This package was tested using php 8.1
and laravel 10.0
Installation
You can install the package via composer:
composer require mrshoikot/securecsv:dev-main"
Usage
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.
Testing
composer test
TODO
-
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
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.