The issue you're facing is due to the fact that the orderByRaw method in Eloquent treats the ? placeholder as a string literal, rather than a column name. To fix this, you can use the orderByRaw method with a raw expression instead.
Here's an example of how you can modify your code to achieve natural sorting:
Model::orderByRaw('CAST(SUBSTRING_INDEX(number, "-", -1) AS UNSIGNED) asc')
->orderBy('number')
->get();
In this example, we're using the SUBSTRING_INDEX function to extract the numeric part of the number column, and then casting it to an unsigned integer using CAST. This will ensure that the sorting is done in a natural way.
Please note that this solution assumes that the numeric part of the number column is always separated by a hyphen ("-"). If your data has a different separator, you'll need to adjust the code accordingly.
I hope this helps! Let me know if you have any further questions.