original_string: public static function translatedList(string $nameKey = "name")
      {
          return (new static())->with('translations')->get()->map(function ($item, $key) use ($nameKey) {
              return [
                  'id'    => $item->id,
                  'label' => get_translation_name(
                      $nameKey, app()->getLocale(), array_get($item, 'translations')
                  ),
              ];
          });
      }
code: public static function translatedList(string $nameKey = "name")
      {
          return (new static())->with('translations')->get()->map(function ($item, $key) use ($nameKey) {
              return [
                  'id'    => $item->id,
                  'label' => get_translation_name(
                      $nameKey, app()->getLocale(), array_get($item, 'translations')
                  ),
              ];
          });
      }
code_tokens: public static function translatedList ( string $ nameKey = "name" ) { return ( new static ( ) ) -> with ( 'translations' ) -> get ( ) -> map ( function ( $ item , $ key ) use ( $ nameKey ) { return [ 'id' => $ item -> id , 'label' => get_translation_name ( $ nameKey , app ( ) -> getLocale ( ) , array_get ( $ item , 'translations' ) ) , ] ; } ) ; }
docstring: Get translated id -> value names
  
  @param string $nameKey
  @return mixed
docstring_tokens: Get translated id - > value names