palmabit / laravel-contact-csv
Save contact input in csv file
1.0.0
2016-10-17 16:55 UTC
Requires
- php: >=5.4.0
- illuminate/config: 5.*
- laravel/framework: 5.*
- sensiolabs/security-checker: *
Requires (Dev)
- fzaninotto/faker: ^1.5
- illuminate/filesystem: 5.*
- illuminate/support: 5.*
- orchestra/testbench: ~3.0
- phpspec/phpspec: ~2.1
- phpunit/phpunit: ~4.0
This package is not auto-updated.
Last update: 2024-11-13 10:12:42 UTC
README
This Laravel package allows you to easily save contact data in CSV format.
Installation
To install this package follow these instructions
composer require palmabit/laravel-contact-csv
- add
Palmabit\ContactCsv\ContactCsvServiceProvider
to yourconfig/app.php
ServiceProviders php artisan vendor:publish --provider="Palmabit\ContactCsv\ContactCsvServiceProvider"
- create csv file and set the absolute path into configuration file
config/packages/Palmabit/ContactCsv/config.php
- fill generated config file
Usage
Save new row in csv file
$my_array = ["email" => "test@test.com"]; try { ContactCsv::save($newletter); } catch (KeyExistException $e) { echo "Key already exsist"; } catch (ConfigValueException $e) { echo "Error in configuration file"; }
Download the csv file
ContactCsv::download();
Tests
You can run tests locally with
phpunit
The build is continuously run on travis.
Contributing
- Add tests for any new or changed functionality
- update doc
Author
License
LaravelContactCSV it's free and easy to integrate within your existing projects. See the MIT License
Todo
• Setup/write/download more than one CSV file