2017 © Pedro Peláez
 

library laravel-contact-csv

Save contact input in csv file

image

palmabit/laravel-contact-csv

Save contact input in csv file

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

LaravelContactCSV

Build Status Scrutinizer Code Quality, (*1)

This Laravel package allows you to easily save contact data in CSV format., (*2)

Installation

To install this package follow these instructions, (*3)

  1. composer require palmabit/laravel-contact-csv
  2. add Palmabit\ContactCsv\ContactCsvServiceProvider to your config/app.php ServiceProviders
  3. php artisan vendor:publish --provider="Palmabit\ContactCsv\ContactCsvServiceProvider"
  4. create csv file and set the absolute path into configuration file config/packages/Palmabit/ContactCsv/config.php
  5. 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, (*4)

  phpunit

The build is continuously run on travis., (*5)

Contributing

  • Add tests for any new or changed functionality
  • update doc

Author

palmabit.com, (*6)

License

LaravelContactCSV it's free and easy to integrate within your existing projects. See the MIT License, (*7)

Todo

• Setup/write/download more than one CSV file, (*8)

The Versions