Download the PHP package piyook/csvseeder without Composer

On this page you can find all versions of the php package piyook/csvseeder. 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 csvseeder


CSV Database Seeder Utility Service

A simple Laravel utility package to seed database tables with CSV data.
Explore the docs »

Table of Contents

  1. About The Project
    • Built With
  2. Getting Started
    • Prerequisites
    • Installation
  3. Usage
  4. Contact



About The Project


A simple utility for Laravel that allows a database to be quickly populated using data from a file in CSV format.

A custom Artisan make: command builds the CSV seeder class which then imports data from a CSV file stored in database/data folder.

Built With

Getting Started


The code can be added to a fresh Laravel install or an existing project.

Prerequisites

Laravel 8+

Installation


Install the package using composer

Usage


A custom Artisan make command was developed to make scaffolding a Seeder Class to import CSV files easier.

The CSV data file must share the same name as the table and be stored in a database/data folder.

To use the Artisan command simply type :


Where the table name to be seeded is passed to the make command along with an ARRAY of column names [].
Note that if the table name is plural then the singular form will be used for the class name

If the seeder class is to be stored in a location OTHER than database/seeders then you can specify this new path as the final option.

E.g A new Seeder Class for a table called "examples" which will import from the "examples.csv" file held in database/data, will be saved to the database/seeders directory with the filename "ExampleCSV.php".


then


DONT FORGET TO REGISTER THE NEW CSV SEEDER IN THE DatabaseSeeder CLASS IN THE SEEDERS FOLDER BEFORE RUNNING A GENERAL DB SEED AS PART OF A MIGRATION WITH THE --SEED OPTION

Testing


Orchestra Testbench would normally be used to run unit and feature tests in the package but the seeder function would not work (the seeder class was not found).

A full seperate Laravel test project was set-up and the tests, phpunit.xml and the database/data, database/migration folders and files in the package test folder copied into the relevant places in the project to set up the test environment.

All Feature tests work running with Artisan test command.

Contact


Email: [email protected]

Project Link: [laravelcsvseed] https://github.com/piyook/laravelcsvseed


All versions of csvseeder with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
ext-json Version *
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 piyook/csvseeder contains the following files

Loading the files please wait ...