mrshoikot/securecsv
Composer 安装命令:
composer require mrshoikot/securecsv
包简介
A Laravel package that encrypts one or more columns from a table and export them into CSV
README 文档
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.
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-08-20