database/seeds/StudentsTableSeeder.php
/**
     * Run the database seeds.
     *
     * @return void
     */
Run the database seeds.
@return void
Run the database seeds . @return void
public function run()
    {
        $faker = Factory::create();
        Student::truncate();
        foreach(range(1,200) as $data){
            $student = [
                'name' => $faker->name,
                'mobile' => $faker->phoneNumber,
                'address' => $faker->address
            ];
            Student::create($student);
        }
    }
public function run ( ) { $ faker = Factory :: create ( ) ; Student :: truncate ( ) ; foreach ( range ( 1 , 200 ) as $ data ) { $ student = [ 'name' => $ faker -> name , 'mobile' => $ faker -> phoneNumber , 'address' => $ faker -> address ] ; Student :: create ( $ student ) ; } }
Run the database seeds.
Run the database seeds .