Download the PHP package chojnicki/laravel-seeder-extended without Composer

On this page you can find all versions of the php package chojnicki/laravel-seeder-extended. 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 laravel-seeder-extended

Laravel Seeder Extended

Extend default Seeder with extra funcionality.

NOTE: This library mixes my laravel-seeder-debugger with extra methods. If you do not wanna use any methods listed below and just need debugger, you can just use chojnicki/laravel-seeder-debugger instead.

Requirements

Instalation with Composer

Usage

In DatabaseSeeder.php simply replace:

with:

Available methods

insertMultiple($collection, $chunkSize = 1000, $sorted = true)

If you use Factory to create for example 10,000 posts then saving them will cause 10,000 queries to database (what will be slow). You can insert multiple items to database with single query passing collection of models to insertMultiple().

Be default 1000 models will be inserted in single query. For models with long data you can decrease this, and for very small models increase. Try to find sweet spot that will be fastest for you ;)

Records will be inserted sorted from the oldest to newest. You can disable this at third parameter and use custom sorting instead.

setRandomDate($model, $max = 15552000)

Short way to generate random date (for created_at and updated_at at once) on model. De default range is 6 months and you can change this in second parameter (in seconds). Method will return Carbon date if you need to use it somewhere else.

Any ideas for more? Feedback and pull requests are welcome :)

Debug

After finished seeding console will debug info like this:

Thanks to this info you can try to write more efficient seeders :)

More info -> chojnicki/laravel-seeder-debugger

Note

This debugger simply extends original Seeder library (it's not a fork) so all functionality is preserved and there should not be conflicts with already written seeders.


All versions of laravel-seeder-extended with dependencies

PHP Build Version
Package Version
Requires chojnicki/laravel-seeder-debugger Version ^1.0
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 chojnicki/laravel-seeder-extended contains the following files

Loading the files please wait ....