Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

how to run multiple seeder at a time in laravel

        for ($i = 0; $i < 10; $i++) {
            DB::table('members')->insert([
                'name' => Str::random(10),
                'email' => Str::random(10) . '@gmail.com',
                'address' => Str::random(30),
                'created_at' => date("Y-m-d H:i:s"),
                'updated_at' => Carbon::now(),
            ]);
        }
 
PREVIOUS NEXT
Tagged: #run #multiple #seeder #time #laravel
ADD COMMENT
Topic
Name
2+7 =