Top "Laravel-seeding" questions

Laravel includes a simple method of seeding your database with test data using seed classes.

What is database seeding in Laravel?

I use Laravel framework and I have recently been informed that there is something named database seeding which produces a …

php laravel laravel-seeding
Laravel faker generate gender from name

What is the optimum way of generating gender using faker, having generated a name so that the gender matches the …

php laravel faker laravel-seeding
Laravel: Seeding multiple unique columns with Faker

Introduction What up folks, I got a question about model factories and multiple unique columns: Background I have a model …

php mysql laravel laravel-5.4 laravel-seeding
Laravel seed database from existing database

i have now new structure of my database, but i need to import the old data in the new format. …

mysql laravel laravel-seeding
How to Run Laravel Database Seeder from PHPUnit Test setUp?

I am trying to recreate the database before each test in some PHPUnit test cases. I am using Laravel 5.3. Here …

laravel laravel-5 phpunit laravel-seeding
Defining Laravel foreign keys with Model Factories, One to One & One to Many Relationships without creating unnecessary models

Recently I have been trying to seed my database using Laravel seeding through Model Factories and Faker. For simple schemas, …

php laravel laravel-5 faker laravel-seeding
Laravel seeding results in Null timestamp

So i had a seeder for Languages Table (LanguageTableSeeder) as follows: DB::table('languages')->insert([ 'name' => 'English', …

laravel eloquent laravel-5.4 laravel-seeding
How to implement your own Faker provider in Laravel

I want to create a custom provider for Faker in Laravel (e.g. one for a random building name). Where …

php laravel faker laravel-seeding
delete test data in laravel migration script

I am trying to clean the test data from my production tables. In simple environment I can write a script …

laravel laravel-seeding
Laravel Factory: Manual Increment of Column

For the following factory definition, the column order needs to be sequential. There is already a column id that is …

php laravel laravel-5.4 laravel-seeding