Download the PHP package davidvandertuijn/laravel-after-seeders without Composer
On this page you can find all versions of the php package davidvandertuijn/laravel-after-seeders. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download davidvandertuijn/laravel-after-seeders
More information about davidvandertuijn/laravel-after-seeders
Files in davidvandertuijn/laravel-after-seeders
Package laravel-after-seeders
Short Description Laravel After Seeders
License MIT
Informations about the package laravel-after-seeders
Laravel After Seeders
This library adds seeders with versioning support for Laravel, suitable for a production environment. The seeders are stored in the database/after_seeders directory using JSON format. Progress is tracked in the after_seeders table. so that the seeder is only run once.
Install
Run migration
Publish config
Usage
Create a new seeder and fill it manually.
With the command below you create an empty after seeder, good if you are already familiar with the JSON structure, and you want to add the data manually.
Created Seeder: /database/after_seeders/YYYY_MM_DD_XXXXXX_my_table.json:
In Navicat for MySQL, the same structure is used when exporting to JSON file (.json).
Create a new seeder and fill it automaticly.
With the command below you create a fully completed seeder based on existing records in a table.
Which columns are requested depends on the specified table. Columns that are not answered are not included in the seeder. At range you specify which record IDs should be included in de seeder.
Created Seeder: /database/after_seeders/YYYY_MM_DD_XXXXXX_my_table.json:
Running Seeders
The pending after seeders are executed with the command below:
During execution it is checked whether the table and / or columns actually exist, otherwise the seeder is skipped.
Created At
If the table has a created_at column, but this is missing from the seeder, the current time is filled in.
Update Or Insert
If the id column exists in the seeder, the updateOrInsert method is used, otherwise the insert method.
All versions of laravel-after-seeders with dependencies
ext-json Version *