database/seeders/UserTableSeeder.php
/**
     * Run the database seeds.
     *
     * @return void
     */
Run the database seeds.
@return void
Run the database seeds . @return void
public function run()
    {
        factory(App\User::class,50)->create();
        $user = User::find(1);
        $user->name = "meloveayu";
        $user->email = "meloveayu@test.com";
        $user->password = bcrypt('szy1999');
        $user->save();
    }
public function run ( ) { factory ( App \ User :: class , 50 ) -> create ( ) ; $ user = User :: find ( 1 ) ; $ user -> name = " meloveayu " ; $ user -> email = " meloveayu@test.com " ; $ user -> password = bcrypt ( 'szy1999' ) ; $ user -> save ( ) ; }
Run the database seeds.
Run the database seeds .
//向users表中插入50条模拟数据