Download the PHP package rhuett/csvie without Composer

On this page you can find all versions of the php package rhuett/csvie. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package csvie

Csvie

Csvie is a simple CSV file parser made for Laravel 7. Csvie is based on LeagueCSV, and can quickly import data to, and export data from, a MySQL database. It also gives you a handy abstract class for quickly sanitizing and scrubbing your CSV files prior to insertion.

How it works

Csvie is meant to quickly load CSV files with more than a few thousand rows of data into a MySQL database. The idea behind how this works is simple:

  1. You upload the CSV files onto your server.
  2. Use Csvie to chunk the files into smaller pieces. Chunking will be done by rows of data, instead of file globs.
  3. Write a custom CSV scrubber to clean data from the chunked files, then overwrite these files on the server.
    1. Note that you do not have to use the included HashCsvCleaner implementation. You are free to write your own using the Rhuett\Csvie\Contracts\CsvieCleaner interface.
  4. Directly load the clean files into your MySQL database directly using the Load Data statement.

Installation

Via Composer:

Make sure to add the following line to your app/config/database.php file:

Once you have finished these configuration changes, don't forget to run:

Note that if you are getting errors about this not being enabled on both the client and server side, then you may also need to edit mysql.cnf:

...and run:

Usage

Single CSV file import example, using a controller's store method:

Making your own Csvie scrubber:

Simply run:

...and you should get a new file that looks like the one below in the App\Services\CsvCleaners directory. Note that the extra comments displayed here will not be included in newly generated files.

Note: If you would like to change the CsvCleaner directory, you can edit the csvie config file in your app's config directory.

Don't forget to add the cleaners directory to your composer.json file (if needed):

Making your own CSV cleaner:

If you want a completely custom CSV Cleaner, then you can make your own implementation based on the Rhuett\Csvie\Contracts\CsvieCleaner contract like so:

Change log

Please see the changelog for more information on what has changed recently.

Testing

Contributing

Please see contributing.md for details and a todolist.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

MPL-2.0. Please see the license file for more information.


All versions of csvie with dependencies

PHP Build Version
Package Version
Requires doctrine/dbal Version ^2.10
illuminate/support Version ~5|~6|~7
league/csv Version ^9.6
spatie/laravel-collection-macros Version ^6.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package rhuett/csvie contains the following files

Loading the files please wait ....