Run the database seeds.

@return void
552425
public function run()
    {
        Model::unguard();

        DB::table('user__users')->delete();
        DB::table('user__roles')->delete();
        DB::table('user__password_resets')->delete();
        DB::table('user__role_user')->delete();
        DB::table('user__permissions')->delete();
        DB::table('user__permission_role')->delete();

        return $this->call(AdminRole::class);
    }
1140191
public function run()
    {
        $this->command->info('Competitors seeding!');
        $userClass = config('laravel-tournaments.user.model');
        $championship = Championship::where('tournament_id', 1)->first();

        $users[] = factory($userClass)->create(['name' => 't1']);
        $users[] = factory($userClass)->create(['name' => 't2']);
        $users[] = factory($userClass)->create(['name' => 't3']);
        $users[] = factory($userClass)->create(['name' => 't4']);
        $users[] = factory($userClass)->create(['name' => 't5']);

        foreach ($users as $user) {
            factory(Competitor::class)->create([
                'championship_id' => $championship->id,
                'user_id' => $user->id,
                'confirmed' => 1,
            ]);
        }
    }
616704
public function run()
    {
        //
        DB::table('districts')->insert([
            'name' => 'Bawku Municipal',
            'region_id' => 8
        ]);
        DB::table('districts')->insert([
            'name' => 'Bawku West',
            'region_id' => 8
        ]);
        DB::table('districts')->insert([
            'name' => 'Binduri',
            'region_id' => 8
        ]);
        DB::table('districts')->insert([
            'name' => 'Bolgatanga Municipal',
            'region_id' => 8
        ]);
        DB::table('districts')->insert([
            'name' => 'Bongo',
            'region_id' => 8
        ]);
        DB::table('districts')->insert([
            'name' => 'Builsa North',
            'region_id' => 8
        ]);
        DB::table('districts')->insert([
            'name' => 'Builsa South',
            'region_id' => 8
        ]);
        DB::table('districts')->insert([
            'name' => 'Garu-Tempane',
            'region_id' => 8
        ]);
        DB::table('districts')->insert([
            'name' => 'Kassena-Nankana',
            'region_id' => 8
        ]);
        DB::table('districts')->insert([
            'name' => 'Kassena Nankana West',
            'region_id' => 8
        ]);
        DB::table('districts')->insert([
            'name' => 'Nabdam',
            'region_id' => 8
        ]);
        DB::table('districts')->insert([
            'name' => 'Pusiga District',
            'region_id' => 8
        ]);
        DB::table('districts')->insert([
            'name' => 'Talensi',
            'region_id' => 8
        ]);
        DB::table('districts')->insert([
            'name' => 'Bolgatanga East District',
            'region_id' => 8
        ]);
        DB::table('districts')->insert([
            'name' => 'Tempane District',
            'region_id' => 8
        ]);
        
    }
1288597
public function run()
    {
        DB::table('languages')->delete();

        foreach ($this->langs() as $lang) {
            Language::create($lang);
        }
    }
1248868
public function run()
    {
        $this->Script->startup();

        $this->Options = $this->Script->getOptions(
            "[db-host:][db-user:][db-password:][db-database:][db-type:|db-driver:][sql][clean][clean-all][conc:][php-exec:][commit-within:]",
            "",
            array(
                'db-host' => "Database host",
                'db-user' => "Database user",
                'db-password' => "Database password",
                'db-database' => "Database name",
                'db-driver' => "Database driver",
                'db-type' => "Database driver, alias for --db-driver",
                'sql' => "Display sql queries",
                'clean' =>  "Remove all search data of the current installation id before beginning indexing",
                'clean-all' => "Remove all search data for all installations",
                'conc' => 'Parallelization, number of concurent processes to use',
                'php-exec' => 'Full path to PHP executable',
                'commit-within' => 'Commit to Solr within this time in seconds (default '
                    . self::DEFAULT_COMMIT_WITHIN . ' seconds)',
            )
        );
        $this->Script->initialize();

        // check if ezfind is enabled and exit if not
        if ( ! in_array( 'ezfind', eZExtension::activeExtensions() ) )
        {
            $this->CLI->error( 'eZ Find extension is not enabled and because of that index process will fail. Please enable it and run this script again.' );
            $this->Script->shutdown( 0 );
        }

        // Fix siteaccess
        $siteAccess = $this->Options['siteaccess'] ? $this->Options['siteaccess'] : false;
        if ( $siteAccess )
        {
            $this->changeSiteAccessSetting( $siteAccess );
        }
        else
        {
            $this->CLI->warning( 'You did not specify a siteaccess. The admin siteaccess is a required option in most cases.' );
            $input = readline( 'Are you sure the default siteaccess has all available languages defined? ([y] or [q] to quit )' );
            if ( $input === 'q' )
            {
                $this->Script->shutdown( 0 );
            }
        }

        // Check that Solr server is up and running
        if ( !$this->checkSolrRunning() )
        {
            $this->Script->shutdown( 1 );
            exit();
        }

        $this->initializeDB();

        // call clean up routines which will deal with the CLI arguments themselves
        $this->cleanUp();
        $this->cleanUpAll();

        if ( isset( $this->Options['commit-within'] )
                && is_numeric( $this->Options['commit-within'] ) )
        {
            $this->commitWithin = (int)$this->Options['commit-within'];
        }


        $this->CLI->output( 'Starting object re-indexing' );

        // Get PHP executable from user.
        $this->getPHPExecutable();

        $this->runMain();
    }
1348880
static public function run()
  {
    foreach (self::$dbs as $db) {
      $db->execute(self::files());
    }

    foreach (self::$writers as $writer) {
      $writer->execute(self::files());
    }
  }
775410
final protected function runDatabaseMigrationsAndSeeders()
    {
        // Ask to migrate the database,
        // if we've copied any migration files to the application.
        if (!empty($this->migrations) && $this->getCommand()->confirm('Do you wish to migrate your database?', true)) {
            try {
                $this->getCommand()->call('migrate');
            } catch (Exception $e) {
                $this->getCommand()->error(sprintf('Could not migrate your database. Reason: %s', $e->getMessage()));
            }
        }

        // Before we ask user to seed the database
        // we need to have look in the $seeders array
        // to remove folders from the array
        $seeders = [];
        foreach ($this->seeders as $seeder) {
            if (is_dir(base_path($seeder))) {
                continue;
            }
            $seeders[] = $seeder;
        }

        // Ask to seed the database,
        // if we've copied any migration files to the application.
        if (!empty($seeders) && $this->getCommand()->confirm('Do you wish to seed your database?', true)) {
            // Load seeders directory so new seeders are available
            load_directory($this->getInstaller()->getBasePath('database/seeds/'));

            // Run package seeders
            foreach ($seeders as $seeder) {
                try {
                    $seederFilename = substr($seeder, strrpos($seeder, '/') + 1);
                    $this->getCommand()->call('db:seed', [
                        '--class' => substr($seederFilename, 0, strrpos($seederFilename, '.')),
                    ]);
                } catch (Exception $e) {
                    $this->getCommand()->error(sprintf('Could not seed database. Reason: %s', $e->getMessage()));
                }
            }
        }
    }
1041048
public function run()
    {
        $this->call(PermissionSeeder::class);
        $this->call(RoleSeeder::class);
        $this->call(GallerySeeder::class);
    }
700092
public function run(): void
    {
        $countries = json_decode(file_get_contents(__DIR__ . '/../../resources/json/countries.json'), true);

        foreach ($countries as $country) {

            $this->connection->beginTransaction();

            try {
                $flag = $this->resourceService->getRepository()->findOneBy(['id' => $country['flag_id']]);

                if (!$flag) {
                    $this->resourceService->download(
                        __DIR__ . '/../../resources/media/flags/' . $country['id'] . '.svg',
                        config('filesystems.default'),
                        'flag-' . $country['id']
                    );
                }

                $translations = $country['translations'];
                array_forget($country, 'translations');

                $countryRecord = $this->countryRepository->updateOrCreate(['id' => $country['id']], $country);
                $countryRecord->updateTranslations($translations);

                $this->connection->commit();

            } catch (\Exception $e) {
                $this->connection->rollBack();
                dd($e);
            }
        }
    }
160259
public function run() {
		$this->load_hooks();

		// Need to ensure these classes are activated here for hooks to fire.
		if ( $this->is_current_page( [ 'options.php', 'options-general.php', 'settings.php' ] ) ) {
			Singleton::get_instance( 'Install', $this )->run();
			Singleton::get_instance( 'Remote_Management', $this )->load_hooks();
		}
	}
1183174
public function run()
    {
        // pages, news, blog, albums
        //\App\Models\Photo::truncate();

        $this->call(RoleTableSeeder::class);
        //$this->call(UserTableSeeder::class);

        $this->call(BannerTableSeeder::class);

        $this->call(PageTableSeeder::class);
        $this->call(NavigationAdminTableSeeder::class);

        //$this->call(SubscriptionPlanFeaturesSeeder::class);
        //$this->call(SubscriptionPlanTableSeeder::class);

        //$this->call(FAQTableSeeder::class);
        //$this->call(TestimonialTableSeeder::class);

        //$this->call(NewsTableSeeder::class);
        //$this->call(ArticleTableSeeder::class);
        //$this->call(PhotoAlbumTableSeeder::class);

        //$this->call(TenderTableSeeder::class);
        //$this->call(VacancyTableSeeder::class);
        //$this->call(AnnualReportTableSeeder::class);

        //$this->call(LocationTableSeeder::class);
    }
557148
public function run()
    {
        $this->languages = ['ru', 'en'];

        foreach ($this->languages as $language) {
            Language::create(
                $this->languages()[$language]
            );
        }
    }
908387
public function run()
    {
        /**
         * Get Available Permissions.
         */
        $permissions = config('roles.models.permission')::all();

        /**
         * Attach Permissions to Roles.
         */
        $roleAdmin = config('roles.models.role')::where('name', '=', 'Admin')->first();
        foreach ($permissions as $permission) {
            $roleAdmin->attachPermission($permission);
        }
    }
62206
protected function runSeeder($database)
	{
		$class = $this->option('seeder') ?: 'DatabaseSeeder';

		$force = $this->input->getOption('force');

		$this->call('db:seed', array(
			'--database' => $database, '--class' => $class, '--force' => $force,
		));
	}
1191729
public function run()
    {
        User::whereUsername('admin')->first()->assignRole(Role::whereName('admin')->first());
        User::whereUsername('user')->first()->assignRole(Role::whereName('user')->first());
    }
1285564
public function run()
    {
        $table = $this->table(CMS_TABLE_GROUPS);
        $table->insert($this->records)->save();
    }
1209889
public function run(): void
    {
        // http://stackoverflow.com/q/1598411
        $list = [
            ['name' => 'Super Admin', 'slug' => HCRoleRepository::ROLE_SA], // Manage everything
            ['name' => 'Project Admin', 'slug' => HCRoleRepository::ROLE_PA], // Manage most aspects of the site
            ['name' => 'User', 'slug' => HCRoleRepository::ROLE_U], // Average Joe
        ];

        foreach ($list as $roleData) {
            $role = $this->repository->findOneBy(['slug' => $roleData['slug']]);

            if (!$role) {
                $this->repository->create($roleData);
            }
        }
    }