Run the database seeds.

@return void
194871
public function run()
    {
        \Artify\Artify\Models\Role::create([
            'slug'        => 'admin',
            'name'        => 'Administrator',
            'permissions' => [
                'view-post'       => true,
                'update-post'     => true,
                'delete-post'     => true,
                'create-post'     => true,
                'approve-post'    => true,
                'create-tag'      => true,
                'update-tag'      => true,
                'delete-tag'      => true,
                'view-tag'        => true,
                'view-comment'    => true,
                'update-comment'  => true,
                'delete-comment'  => true,
                'create-comment'  => true,
                'approve-comment' => true,
                'view-reply'      => true,
                'update-reply'    => true,
                'delete-reply'    => true,
                'create-reply'    => true,
                'approve-reply'   => true,
                'upgrade-user'    => true,
                'downgrade-user'  => true,
            ],
        ]);
        \Artify\Artify\Models\Role::create([
            'slug'        => 'moderator',
            'name'        => 'Moderator',
            'permissions' => [
                'create-post'     => true,
                'view-post'       => true,
                'delete-post'     => true,
                'update-post'     => true,
                'approve-post'    => false,
                'create-tag'      => true,
                'update-tag'      => true,
                'view-tag'        => true,
                'delete-tag'      => true,
                'create-comment'  => true,
                'update-comment'  => true,
                'delete-comment'  => true,
                'view-comment'    => true,
                'approve-comment' => true,
                'create-reply'    => true,
                'update-reply'    => true,
                'delete-reply'    => true,
                'view-reply'      => true,
                'approve-reply'   => true,
                'upgrade-user'    => false,
                'downgrade-user'  => false,
            ],
        ]);
        \Artify\Artify\Models\Role::create([
            'name'        => 'Normal User',
            'slug'        => 'user',
            'permissions' => [
                'create-post'     => false,
                'view-post'       => true,
                'update-post'     => false,
                'delete-post'     => false,
                'approve-post'    => false,
                'create-tag'      => false,
                'view-tag'        => false,
                'update-tag'      => false,
                'delete-tag'      => false,
                'create-comment'  => true,
                'update-comment'  => true,
                'view-comment'    => true,
                'delete-comment'  => true,
                'approve-comment' => false,
                'create-reply'    => true,
                'update-reply'    => true,
                'view-reply'      => true,
                'delete-reply'    => true,
                'approve-reply'   => false,
                'upgrade-user'    => false,
                'downgrade-user'  => false,
            ],
        ]);
    }
274956
public function run()
	{
		$this->call(UsersTableSeeder::class);
		$this->call(ConfTableSeeder::class);
		$this->call(LangTableSeeder::class);
		
		$this->call(MediaCategoryTableSeeder::class);
		$this->call(MediaTypeTableSeeder::class);
		
		$this->call(PageTableSeeder::class);
		$this->call(PageLangTableSeeder::class);
		$this->call(NavigationGroupTableSeeder::class);
	}
463071
public function run()
    {
        Eloquent::unguard();

        foreach ($this->seeds as $seed) {
            $this->call($seed);
        }

        Eloquent::reguard();
    }
697925
public function run()
    {
        Model::unguard();
        try {
            foreach ($this->seederClasses as $seederClass) {
                $this->parentSeeder->call($seederClass);
            }
        } finally {
            Model::reguard();
        }
    }
1200575
public function run()
	{
		$this->permissionsUserSeeder();
        $this->permissionsRoleSeeder();
        $this->permissionsSeeder();
        $this->permissionsAllSeeder();
        $this->rolesSeeder();
        $this->addPermissionRoleSeeder();
		$this->usersSeeder();
		$this->roleUserSeeder();
	}
974237
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();

        $this->createAdmin();
        $this->createDemo();

        $this->createUsers();
    }
406188
public function run()
    {
        $this->call(ImageStylesTableSeeder::class);
        $this->call(PermissionsTableSeeder::class);
        $this->call(RolesTableSeeder::class);
        $this->call(UsersTableSeeder::class);
    }
831605
public function run()
    {
        $this->command->info('Truncating User, Role and Permission tables');
        $this->truncateLaratrustTables();

        $config = config('laratrust_seeder.role_structure');
        $userPermission = config('laratrust_seeder.permission_structure');
        $mapPermission = collect(config('laratrust_seeder.permissions_map'));

        foreach ($config as $key => $modules) {
            // Create a new role
            $role = \Simoja\Laramin\Models\Role::create([
                'name' => $key,
                'display_name' => ucwords(str_replace("_", " ", $key)),
                'description' => ucwords(str_replace("_", " ", $key))
            ]);

            $this->command->info('Creating Role '. strtoupper($key));

            // Reading role permission modules
            foreach ($modules as $module => $value) {
                $permissions = explode(',', $value);

                foreach ($permissions as $p => $perm) {
                    $permissionValue = $mapPermission->get($perm);

                    $permission = \Simoja\Laramin\Models\Permission::firstOrCreate([
                        'name' => $permissionValue . '-' . $module,
                        'display_name' => ucfirst($permissionValue) . ' ' . ucfirst($module),
                        'description' => ucfirst($permissionValue) . ' ' . ucfirst($module),
                    ]);

                    $this->command->info('Creating Permission to '.$permissionValue.' for '. $module);

                    if (!$role->hasPermission($permission->name)) {
                        $role->attachPermission($permission);
                    } else {
                        $this->command->info($key . ': ' . $p . ' ' . $permissionValue . ' already exist');
                    }
                }
            }

            $this->command->info("Creating '{$key}' user");
            // Create default user for each role
            $user = \App\User::create([
                'name' => ucwords(str_replace("_", " ", $key)),
                'email' => $key.'@app.com',
                'password' => bcrypt('password')
            ]);
            $user->attachRole($role);
        }

        // creating user with permissions
        if (!empty($userPermission)) {
            foreach ($userPermission as $key => $modules) {
                foreach ($modules as $module => $value) {
                    $permissions = explode(',', $value);
                    // Create default user for each permission set
                    $user = \App\User::create([
                        'name' => ucwords(str_replace("_", " ", $key)),
                        'email' => $key.'@app.com',
                        'password' => bcrypt('password'),
                        'remember_token' => str_random(10),
                    ]);
                    foreach ($permissions as $p => $perm) {
                        $permissionValue = $mapPermission->get($perm);

                        $permission = \Simoja\Laramin\Models\Permission::firstOrCreate([
                            'name' => $permissionValue . '-' . $module,
                            'display_name' => ucfirst($permissionValue) . ' ' . ucfirst($module),
                            'description' => ucfirst($permissionValue) . ' ' . ucfirst($module),
                        ]);

                        $this->command->info('Creating Permission to '.$permissionValue.' for '. $module);

                        if (!$user->hasPermission($permission->name)) {
                            $user->attachPermission($permission);
                        } else {
                            $this->command->info($key . ': ' . $p . ' ' . $permissionValue . ' already exist');
                        }
                    }
                }
            }
        }
    }
132528
public function run()
    {
        $users = users('member');
        if (empty($users)) {
            return;
        }
        $this->down();
        $insert = [];
        foreach ($users as $user) {
            for ($i = 0; $i < 2; $i++) {
                array_push($insert, $this->createInsert($user->id));
            }
        }
        for ($i = 0; $i < 10; $i++) {
            $user = $users->random();
            array_push($insert, $this->createInsert($user->id));
        }
        DB::table('tbl_custom_module')->insert($insert);
        $widgetParamsSchemaPath = __DIR__ . '/schemas/widget_params.sql';
        if (file_exists($widgetParamsSchemaPath)) {
            DB::unprepared(file_get_contents($widgetParamsSchemaPath));
        }
    }
310125
public function run()
    {
        \DB::table('lfm_categories')->delete();
        \DB::table('lfm_categories')->insert(
            array (
                'id' => '0',
                'user_id' => 0,
                'title' => 'Root folder',
                'title_disc' => 'root_folder',
                'description' => 'root',
                'parent_category_id' => '#',
                'created_by' => 0,
                'created_at' => NULL,
                'updated_at' => NULL,
                'deleted_at' => NULL,
            )
        );
        \DB::unprepared("UPDATE lfm_categories SET id=0");
        \DB::table('lfm_categories')->insert(array (
            0 =>
                array (
                    'id' => -5,
                    'user_id' => 0,
                    'title' => 'Direct upload',
                    'title_disc' => 'direct_folder',
                    'description' => 'direct upload folder',
                    'parent_category_id' => '#',
                    'created_by' => 0,
                    'created_at' => NULL,
                    'updated_at' => NULL,
                    'deleted_at' => NULL,
                ),
            1 =>
                array (
                    'id' => -2,
                    'user_id' => 0,
                    'title' => 'Share folder',
                    'title_disc' => 'share_folder',
                    'description' => 'share',
                    'parent_category_id' => '#',
                    'created_by' => 0,
                    'created_at' => NULL,
                    'updated_at' => NULL,
                    'deleted_at' => NULL,
                ),
            2 =>
                array (
                    'id' => -1,
                    'user_id' => 0,
                    'title' => 'public folder',
                    'title_disc' => 'public_folder',
                    'description' => 'public',
                    'parent_category_id' => '#',
                    'created_by' => 0,
                    'created_at' => NULL,
                    'updated_at' => NULL,
                    'deleted_at' => NULL,
                ),
        ));

    }
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();
    }
1186652
public function run()
	{
		$i = 0;
		
		DB::table('conf')->insert([
			'slug' => 'email',
			'value' => 'somebody@somewhere.com',
			'ord' => $i++,
			'created_at' => date("Y-m-d H:i:s"),
			'updated_at' => date("Y-m-d H:i:s")
		]);
		DB::table('conf')->insert([
			'slug' => 'telephone',
			'value' => '070000000',
			'ord' => $i++,
			'created_at' => date("Y-m-d H:i:s"),
			'updated_at' => date("Y-m-d H:i:s")
		]);
		DB::table('conf')->insert([
			'slug' => 'facebook_url',
			'value' => 'http://facebook.com/',
			'ord' => $i++,
			'created_at' => date("Y-m-d H:i:s"),
			'updated_at' => date("Y-m-d H:i:s")
		]);
		DB::table('conf')->insert([
			'slug' => 'youtube_url',
			'value' => 'http://youtube.com/',
			'ord' => $i++,
			'created_at' => date("Y-m-d H:i:s"),
			'updated_at' => date("Y-m-d H:i:s")
		]);
		DB::table('conf')->insert([
			'slug' => 'googleplus_url',
			'value' => 'http://plus.google.com/',
			'ord' => $i++,
			'created_at' => date("Y-m-d H:i:s"),
			'updated_at' => date("Y-m-d H:i:s")
		]);
		DB::table('conf')->insert([
			'slug' => 'pinterest_url',
			'value' => 'http://pinterest.com/',
			'ord' => $i++,
			'created_at' => date("Y-m-d H:i:s"),
			'updated_at' => date("Y-m-d H:i:s")
		]);
		DB::table('conf')->insert([
			'slug' => 'ips',
			'value' => '',
			'ord' => $i++,
			'created_at' => date("Y-m-d H:i:s"),
			'updated_at' => date("Y-m-d H:i:s")
		]);
	}
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);
            }
        }
    }
645201
public function run()
    {
        Model::unguard();

        DB::table('core__media')->delete();
        DB::table('core__activities')->delete();

        $this->clearStoredMedia();
    }
730735
public function run(): void
    {
        foreach (self::SETTINGS as $setting_name => $setting_value) {
            DB::table('site_setting')->updateOrInsert([
                'setting_name'  => $setting_name,
            ], [
                'setting_value' => $setting_value,
            ]);
        }
    }
336518
public function run() {
		$options    = $this->get_class_vars( 'Base', 'options' );
		$db_version = isset( $options['db_version'] ) ? (int) $options['db_version'] : 6000;

		if ( $db_version === $this->db_version ) {
			return;
		}

		switch ( $db_version ) {
			case $db_version < $this->db_version:
				$this->delete_flush_cache();
				break;
			default:
				break;
		}

		$options = array_merge( (array) $options, [ 'db_version' => (int) $this->db_version ] );
		update_site_option( 'github_updater', $options );
	}
619180
public function run()
    {
        DB::beginTransaction();
        try {
            $this->down();
            $this->addNotification([
                'category' => 'default',
                'severity' => 'high',
                'type'     => 'email',
                'event'    => 'email.sample-module-notification',
                'contents' => [
                    'en' => [
                        'title'   => 'Sample Email Template',
                        'content' => file_get_contents(__DIR__ . '/../../views/notification/module_sample_notification.twig')
                    ],
                ]
            ]);
        } catch (Exception $ex) {
            DB::rollback();
            throw $ex;
        }

        DB::commit();
    }