barryvdh/laravel-ide-helper

Why are Mysql Decimal types mapped as strings?

WordsofDefiance opened this issue · 2 comments

If you use the decimal cast from Laravel, it will convert to string. Or are you working with floats? Because I think that would lead to more errors.

I am using a decimal(8,2) column in the database, and the first time I ran the ide-helper, it wrote the column as a string in the docblock. The app expects this column to be a float. I ended up using the custom_db_types config to override this behavior.

I'm not using casts of any sort.