V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
Augustine1128
V2EX  ›  程序员

laravel 创建 float 类型字段

  •  
  •   Augustine1128 · Jul 23, 2019 via Android · 1839 views
    This topic created in 2476 days ago, the information mentioned may be changed or developed.

    我用 laravel 的 migration 创建数据表,其中一个字段为 float 类型,使用$table->float ()方法,但是创建完之后,数据库显示的类型确是 double,请问有什么办法解决吗?

    2 replies    2019-07-23 11:48:44 +08:00
    ipengxh
        1
    ipengxh  
       Jul 23, 2019
    laravel
        2
    laravel  
       Jul 23, 2019
    laravel 强制 double, float 会被替换成 double
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   969 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 44ms · UTC 23:40 · PVG 07:40 · LAX 16:40 · JFK 19:40
    ♥ Do have faith in what you're doing.