Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Sort an array in ascending order
<?php sort(array &$array, int $flags = SORT_REGULAR): true
<?php             fn ($name) => Str::snake($name),

            $segments

        );

        sort($segments);



        return strtolower(implode('_', $segments));

    }
<?php     public function addPivotTable(string $reference)

    {

        $segments = [$this->name(), class_basename($reference)];

        sort($segments);

        $this->pivotTables[] = $segments;

    }