database/seeds/DatabaseSeeder.php
/**
     * Run the database seeds.
     *
     * @return void
     */
Run the database seeds.
@return void
Run the database seeds . @return void
public function run()
    {
        if (!User::count()) {
            $this->addAdmins();
            factory(User::class, 50)->create();
        }
        if (!Raffle::count()) {
            factory(Raffle::class, 1)->create();
        }
        if (!Ticket::count()) {
            factory(Ticket::class, 1000)->create();
        }
        if (!RafflePhotos::count()) {
            factory(RafflePhotos::class, 3)->create();
        }
        if (!Payments::count()) {
            factory(Payments::class, 500)->create();
        }
    }
public function run ( ) { if ( ! User :: count ( ) ) { $ this -> addAdmins ( ) ; factory ( User :: class , 50 ) -> create ( ) ; } if ( ! Raffle :: count ( ) ) { factory ( Raffle :: class , 1 ) -> create ( ) ; } if ( ! Ticket :: count ( ) ) { factory ( Ticket :: class , 1000 ) -> create ( ) ; } if ( ! RafflePhotos :: count ( ) ) { factory ( RafflePhotos :: class , 3 ) -> create ( ) ; } if ( ! Payments :: count ( ) ) { factory ( Payments :: class , 500 ) -> create ( ) ; } }
Run the database seeds.
Run the database seeds .