Run the database seeds.
10244
public function run()
    {
        $users = [
            [
                'name'     => 'admin',
                'email'    => 'admin@admin.com',
                'password' => 'vercingetorige',
                'role'     => 'admin',
                'enabled'  => 1,
            ],
        ];

        $um = new UserManager();

        foreach ($users as $user) {
            $um->createOrFail($user);
        }

        return 1;
    }
100486
public function run()
    {
        $countries = @json_decode(file_get_contents(realpath(__DIR__ . '/../seeds/countries.json'), true));

        DB::table(config('countries.table_name'))->delete();

        foreach ($countries as $countryId => $country) {
            DB::table(config('countries.table_name'))->insert(array(
                'id' => $countryId,
                'capital' => $country->capital ?? null,
                'citizenship' => $country->citizenship ?? null,
                'country_code' => $country->country_code,
                'currency' => $country->currency ?? null,
                'currency_code' => $country->currency_code ?? null,
                'currency_sub_unit' => $country->currency_sub_unit ?? null,
                'currency_decimals' => $country->currency_decimals ?? null,
                'full_name' => $country->full_name ?? null,
                'iso_3166_2' => $country->iso_3166_2,
                'iso_3166_3' => $country->iso_3166_3,
                'name' => $country->name,
                'region_code' => $country->region_code,
                'sub_region_code' => $country->sub_region_code,
                'eea' => (bool) $country->eea,
                'calling_code' => $country->calling_code,
                'currency_symbol' => $country->currency_symbol ?? null,
                'flag' => $country->flag ?? null,
            ));
        }
    }
805901
public function run()
    {
        $this->seed('CategoriesTableSeeder');
        $this->seed('UsersTableSeeder');
        $this->seed('PostsTableSeeder');
        $this->seed('PagesTableSeeder');
        $this->seed('SettingsTableSeeder');
        $this->seed('TranslationsTableSeeder');
    }
764850
public function run()
    {
        foreach($this->dumpFiles() as $dumpPart) {

            $query = "LOAD DATA LOCAL INFILE '"
                    . str_replace('\\', '/', $dumpPart) . "'
                    INTO TABLE `" . Config::citiesTableName() . "` 
                        FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '\"'
                        LINES TERMINATED BY '\n' IGNORE 1 LINES
                        (country,
                        city_ascii,
                        city,
                        region,
                        population,
                        latitude,
                        longitude
                    )";

            DB::connection()->getpdo()->exec($query);

        }
    }
1106869
public function run()
    {
        if (!App::environment('testing')) {
            DB::statement('SET FOREIGN_KEY_CHECKS=0');
        }
        DB::table(config('combine-core.tablePrefix', 'combine') . '_addresses')->truncate();
        DB::table(config('combine-core.tablePrefix', 'combine') . '_notes')->truncate();
        DB::table(config('combine-core.tablePrefix', 'combine') . '_phones')->truncate();
        DB::table('users')->truncate();
        if (!App::environment('testing')) {
            DB::statement('SET FOREIGN_KEY_CHECKS=1');
        }
    }
618077
public function run()
    {
        DB::statement('SET FOREIGN_KEY_CHECKS=0;');

        DB::table('role_has_permissions')->truncate();
        DB::table('user_has_roles')->truncate();
        DB::table('user_has_permissions')->truncate();
        DB::table('roles')->truncate();
        DB::table('permissions')->truncate();
        DB::table('users')->truncate();
        $this->call(RolesTableSeeder::class);
        $this->call(PermissionsTableSeeder::class);
        $this->call(UsersTableSeeder::class);
        $this->call(PermissionRoleTableSeeder::class);
        $this->call(RoleUserTableSeeder::class);

        DB::statement('SET FOREIGN_KEY_CHECKS=0;');
    }
1296915
public function run()
    {

        // Check if we have the schedules, else,
        // insert them
        foreach ($this->schedule as $job) {

            if (! DB::table('schedules')->where('command', $job['command'])->first())
                DB::table('schedules')->insert($job);
        }
    }
697925
public function run()
    {
        Model::unguard();
        try {
            foreach ($this->seederClasses as $seederClass) {
                $this->parentSeeder->call($seederClass);
            }
        } finally {
            Model::reguard();
        }
    }
1288597
public function run()
    {
        DB::table('languages')->delete();

        foreach ($this->langs() as $lang) {
            Language::create($lang);
        }
    }
1290270
def run():
    """"""
    args = parse()
    build_results = [build(p) for p in glob.iglob(glob_path)]

    if not args['publish']:
        return

    for entry in build_results:
        publish(entry)
589226
public function run()
	{
		\Aimeos\MShop\Index\Manager\Factory::create( $this->getContext() )->optimize();
	}
699522
public function run()
    {
        $this->seed([
            [
                'group'       => [
                    'name'        => 'Auth',
                    'slug'        => 'auth',
                    'description' => 'Auth permissions group',
                ],
                'permissions' => array_merge(
                    $this->getDashboardPermissions(),
                    $this->getUsersPermissions(),
                    $this->getRolesPermissions(),
                    $this->getPermissionsPermissions(),
                    $this->getPasswordResetsPermissions()
                ),
            ],
        ]);
    }
649417
public function run()
    {
        Model::unguard();

        $this->call(RolesTableSeeder::class);
        $this->call(UserTableSeeder::class);

        Model::reguard();
    }
368684
public function run()
    {
        Setting::truncate();

        $settings = $this->settings();
        foreach ($settings as $setting) {
            Setting::create($setting);
        }
    }
1136977
public function run()
    {
        $topdir = $this->getBasePath();

        foreach (scandir($topdir) as $filename) {

            // Skip directory link files
            if (($filename == '.') || ($filename == '..')) {
                continue;
            }

            if (is_dir($topdir . DIRECTORY_SEPARATOR . $filename)) {
                // Recurse into lower level directory, providing the namespace
                $this->loadFiles($filename, $filename);
            }
        }
    }
147488
public function run()
    {
        $sqlite = in_array(config('database.default'), ['sqlite', 'testing'], true);

        if (! $sqlite) {
            DB::statement('SET FOREIGN_KEY_CHECKS=0');
        }

        if (is_50() or is_51()) {
            Eloquent::unguard();
        }

        $faker = Faker::create();

        // Seeding authors table
        Author::truncate();

        foreach (range(1, 10) as $index) {
            Author::create([
                'name' => $faker->userName,
                'email' => $faker->safeEmail,
            ]);
        }

        $this->command->line("<info>Seeded:</info> authors table");

        // Seeding resources table
        Book::truncate();

        $authorIds = (is_50())
            ? Author::pluck('id')
            : Author::pluck('id')->toArray();

        foreach (range(1, 100) as $index) {
            Book::create([
                'title' => $faker->sentence(),
                'author_id' => $faker->randomElement($authorIds),
                'published_at' => $faker->dateTimeThisCentury,
                'description' => $faker->randomElement([$faker->paragraph(), null]),
                'out_of_print' => $faker->randomElement([true, false]),
                'created_at' => $faker->dateTimeThisYear,
            ]);
        }

        if (is_50() or is_51()) {
            Eloquent::regard();
        }

        if (! $sqlite) {
            DB::statement('SET FOREIGN_KEY_CHECKS=1');
        }

        $this->command->line("<info>Seeded:</info> books table");
    }
829269
def run(generate_pks, show_pks, host, port, uri):
    """"""
    app.config['SQLALCHEMY_DATABASE_URI'] = uri
    app.config['SANDMAN_GENERATE_PKS'] = generate_pks
    app.config['SANDMAN_SHOW_PKS'] = show_pks
    app.config['SERVER_HOST'] = host
    app.config['SERVER_PORT'] = port
    activate(name='sandmanctl')
    app.run(host=host, port=int(port), debug=True)