database/seeds/ActiclecommentSeederTable.php
/**
     * Run the database seeds.
     *
     * @return void
     */
Run the database seeds.
@return void
Run the database seeds . @return void
public function run()
    {
        $faker = \Faker\Factory::create('App\ActicleComment');
        for ($i = 1; $i <= 100; $i++) {
            DB::table('jsyfb_acticle_comment')->insert([
                'user_id'        => $faker->numberBetween(1, 500),
                'article_id'     => $faker->numberBetween(1, 100),
                'interpretation' => $faker->sentence(),
                'measures'       => $faker->sentence(),
                'created_at'     => \Carbon\Carbon::now(),
                'updated_at'     => \Carbon\Carbon::now(),
            ]);
        }
    }
public function run ( ) { $ faker = \ Faker \ Factory :: create ( 'App\ActicleComment' ) ; for ( $ i = 1 ; $ i <= 100 ; $ i ++ ) { DB :: table ( 'jsyfb_acticle_comment' ) -> insert ( [ 'user_id' => $ faker -> numberBetween ( 1 , 500 ) , 'article_id' => $ faker -> numberBetween ( 1 , 100 ) , 'interpretation' => $ faker -> sentence ( ) , 'measures' => $ faker -> sentence ( ) , 'created_at' => \ Carbon \ Carbon :: now ( ) , 'updated_at' => \ Carbon \ Carbon :: now ( ) , ] ) ; } }
Run the database seeds.
Run the database seeds .
//