database/seeds/MahasiswaSeeder.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(); 
		$limit = 7; 
		for ($i = 0; $i <$limit; $i++){
			DB::table('model_mahasiswas')->insert([ 
			'nama' =>$faker->name,
			'email' =>$faker->unique()->email, 
			'nohp' =>$faker->phoneNumber,
			'alamat' =>$faker->address,
			'hobi' =>$faker->name,
			]);
		}
    }
public function run ( ) { $ faker = Faker \ Factory :: create ( ) ; $ limit = 7 ; for ( $ i = 0 ; $ i < $ limit ; $ i ++ ) { DB :: table ( 'model_mahasiswas' ) -> insert ( [ 'nama' => $ faker -> name , 'email' => $ faker -> unique ( ) -> email , 'nohp' => $ faker -> phoneNumber , 'alamat' => $ faker -> address , 'hobi' => $ faker -> name , ] ) ; } }
Run the database seeds.
Run the database seeds .
//import library //batasan pembuatan data palsu //isi datadi database //email uniquesupaya tidak ada yang sama