Laravel 3 Schema Table Column Collation

前端 未结 5 2099
耶瑟儿~
耶瑟儿~ 2021-02-06 19:44

I\'m learning laravel, and I\'m stuck on a simple process. I want the tables to be generated as UTF-8 but varchar and text fields are like latin-1.

Schema section in gui

5条回答
  •  一整个雨季
    2021-02-06 20:15

    I'm stuck on the same, I guess there is no way in Laravel to change/set collation of the charset. But you can change the default collation for charset in your my.ini/my.cnf of your MySQL Server!

    [mysqld]
    #...
    collation-server = utf8_unicode_ci
    #...
    

提交回复
热议问题