app/Services/IndividualListService.php
private function whereInitialHungarian(Builder $query, Expression $field, string $letter): void
    {
        switch ($letter) {
            case 'C':
                $query->where($field, 'LIKE', 'C%')->where($field, 'NOT LIKE', 'CS%');
                break;

            case 'D':
                $query->where($field, 'LIKE', 'D%')->where($field, 'NOT LIKE', 'DZ%');
                break;

            case 'DZ':
                $query->where($field, 'LIKE', 'DZ%')->where($field, 'NOT LIKE', 'DZS%');
                break;

            case 'G':
                $query->where($field, 'LIKE', 'G%')->where($field, 'NOT LIKE', 'GY%');
                break;

            case 'L':
                $query->where($field, 'LIKE', 'L%')->where($field, 'NOT LIKE', 'LY%');
                break;

            case 'N':
                $query->where($field, 'LIKE', 'N%')->where($field, 'NOT LIKE', 'NY%');
                break;

            case 'S':
                $query->where($field, 'LIKE', 'S%')->where($field, 'NOT LIKE', 'SZ%');
                break;

            case 'T':
                $query->where($field, 'LIKE', 'T%')->where($field, 'NOT LIKE', 'TY%');
                break;

            case 'Z':
                $query->where($field, 'LIKE', 'Z%')->where($field, 'NOT LIKE', 'ZS%');
                break;

            default:
                $query->where($field, 'LIKE', '\\' . $letter . '%');
                break;
        }
    }
private function whereInitialHungarian(Builder $query, Expression $field, string $letter): void
    {
        switch ($letter) {
            case 'C':
                $query->where($field, 'LIKE', 'C%')->where($field, 'NOT LIKE', 'CS%');
                break;

            case 'D':
                $query->where($field, 'LIKE', 'D%')->where($field, 'NOT LIKE', 'DZ%');
                break;

            case 'DZ':
                $query->where($field, 'LIKE', 'DZ%')->where($field, 'NOT LIKE', 'DZS%');
                break;

            case 'G':
                $query->where($field, 'LIKE', 'G%')->where($field, 'NOT LIKE', 'GY%');
                break;

            case 'L':
                $query->where($field, 'LIKE', 'L%')->where($field, 'NOT LIKE', 'LY%');
                break;

            case 'N':
                $query->where($field, 'LIKE', 'N%')->where($field, 'NOT LIKE', 'NY%');
                break;

            case 'S':
                $query->where($field, 'LIKE', 'S%')->where($field, 'NOT LIKE', 'SZ%');
                break;

            case 'T':
                $query->where($field, 'LIKE', 'T%')->where($field, 'NOT LIKE', 'TY%');
                break;

            case 'Z':
                $query->where($field, 'LIKE', 'Z%')->where($field, 'NOT LIKE', 'ZS%');
                break;

            default:
                $query->where($field, 'LIKE', '\\' . $letter . '%');
                break;
        }
    }
private function whereInitialHungarian ( Builder $ query , Expression $ field , string $ letter ) : void { switch ( $ letter ) { case 'C' : $ query -> where ( $ field , 'LIKE' , 'C%' ) -> where ( $ field , 'NOT LIKE' , 'CS%' ) ; break ; case 'D' : $ query -> where ( $ field , 'LIKE' , 'D%' ) -> where ( $ field , 'NOT LIKE' , 'DZ%' ) ; break ; case 'DZ' : $ query -> where ( $ field , 'LIKE' , 'DZ%' ) -> where ( $ field , 'NOT LIKE' , 'DZS%' ) ; break ; case 'G' : $ query -> where ( $ field , 'LIKE' , 'G%' ) -> where ( $ field , 'NOT LIKE' , 'GY%' ) ; break ; case 'L' : $ query -> where ( $ field , 'LIKE' , 'L%' ) -> where ( $ field , 'NOT LIKE' , 'LY%' ) ; break ; case 'N' : $ query -> where ( $ field , 'LIKE' , 'N%' ) -> where ( $ field , 'NOT LIKE' , 'NY%' ) ; break ; case 'S' : $ query -> where ( $ field , 'LIKE' , 'S%' ) -> where ( $ field , 'NOT LIKE' , 'SZ%' ) ; break ; case 'T' : $ query -> where ( $ field , 'LIKE' , 'T%' ) -> where ( $ field , 'NOT LIKE' , 'TY%' ) ; break ; case 'Z' : $ query -> where ( $ field , 'LIKE' , 'Z%' ) -> where ( $ field , 'NOT LIKE' , 'ZS%' ) ; break ; default : $ query -> where ( $ field , 'LIKE' , '\\' . $ letter . '%' ) ; break ; } }
Hungarian has many digraphs and trigraphs, so exclude these from prefixes.

@param Builder    $query
@param Expression $field
@param string     $letter
Hungarian has many digraphs and trigraphs so exclude these from prefixes .