public static function createVirtualColumnsForSlug(string $postTypeSlug, $languageSlugs = [])
    {
        $languageSlugs = ($languageSlugs && !is_array($languageSlugs) ? explode(" ", $languageSlugs): $languageSlugs);
        $languageSlugs = ($languageSlugs ? $languageSlugs : Language::all()->pluck(['slug'])->toArray());

        $virtualColumns = [];
        foreach ($languageSlugs as $languageSlug){
            $virtualColumns[] = [
              "name" => $languageSlug,
              "type" => "string",
              "index" => true,
              "length" => 200,
            ];
        }
        AccioQuery::createVirtualColumns($postTypeSlug, "slug", $virtualColumns);
    }
public static function createVirtualColumnsForSlug(string $postTypeSlug, $languageSlugs = [])
    {
        $languageSlugs = ($languageSlugs && !is_array($languageSlugs) ? explode(" ", $languageSlugs): $languageSlugs);
        $languageSlugs = ($languageSlugs ? $languageSlugs : Language::all()->pluck(['slug'])->toArray());

        $virtualColumns = [];
        foreach ($languageSlugs as $languageSlug){
            $virtualColumns[] = [
              "name" => $languageSlug,
              "type" => "string",
              "index" => true,
              "length" => 200,
            ];
        }
        AccioQuery::createVirtualColumns($postTypeSlug, "slug", $virtualColumns);
    }
public static function createVirtualColumnsForSlug ( string $ postTypeSlug , $ languageSlugs = [ ] ) { $ languageSlugs = ( $ languageSlugs && ! is_array ( $ languageSlugs ) ? explode ( " " , $ languageSlugs ) : $ languageSlugs ) ; $ languageSlugs = ( $ languageSlugs ? $ languageSlugs : Language :: all ( ) -> pluck ( [ 'slug' ] ) -> toArray ( ) ) ; $ virtualColumns = [ ] ; foreach ( $ languageSlugs as $ languageSlug ) { $ virtualColumns [ ] = [ "name" => $ languageSlug , "type" => "string" , "index" => true , "length" => 200 , ] ; } AccioQuery :: createVirtualColumns ( $ postTypeSlug , "slug" , $ virtualColumns ) ; }
Create virtual columns for slug in every language

@param string       $postTypeSlug
@param array|string $languageSlugs
Create virtual columns for slug in every language