database/seeds/LaywersSeederTable.php
/**
     * Run the database seeds.
     *
     * @return void
     */
Run the database seeds.
@return void
Run the database seeds . @return void
public function run()
    {
        $faker = Faker::create('App\Laywer');
        for ($i = 1; $i <= 100; $i++) {
            DB::table('jsyfb_laywer')->insert([
                'name'       => $faker->name(),
                'class_id'   => $faker->numberBetween(1, 5),
                'level'      => $faker->numberBetween(1, 5),
                'title'      => $faker->jobTitle,
                'created_at' => \Carbon\Carbon::now(),
                'updated_at' => \Carbon\Carbon::now(),
            ]);
        }
    }
public function run ( ) { $ faker = Faker :: create ( 'App\Laywer' ) ; for ( $ i = 1 ; $ i <= 100 ; $ i ++ ) { DB :: table ( 'jsyfb_laywer' ) -> insert ( [ 'name' => $ faker -> name ( ) , 'class_id' => $ faker -> numberBetween ( 1 , 5 ) , 'level' => $ faker -> numberBetween ( 1 , 5 ) , 'title' => $ faker -> jobTitle , 'created_at' => \ Carbon \ Carbon :: now ( ) , 'updated_at' => \ Carbon \ Carbon :: now ( ) , ] ) ; } }
Run the database seeds.
Run the database seeds .