find() on model gives id as string in one environment and int in other

前端 未结 1 333
轻奢々
轻奢々 2020-12-21 04:47

I am using Laravel 5 and have a model Book.

I have two environments - dev and production

On dev: In tinker

相关标签:
1条回答
  • 2020-12-21 05:24

    Obviously you don't want to do any manual casting as suggested in comment. It seems that on one server you miss mysqlnd extension (I need to assume you use MySQL because you haven't mentioned it in your question) what causes that all data types are returned as strings.

    0 讨论(0)
提交回复
热议问题