我正在Laravel 5上设置迁移,想知道是否有关于每种列类型的默认长度的文档?他们是否遵循MySQL这样的惯例?

前任:

我说的是这些列类型: (http://laravel.com/docs/5.0/schema#adding-columns)

推荐答案

以下是有关列类型的Laravel文档链接

http://laravel.com/api/5.0/Illuminate/Database/Schema/Blueprint.html

From the documentation, I guess the default of 255 is imposed on string() and char() methods as evident from

http://laravel.com/api/5.0/Illuminate/Database/Schema/Blueprint.html#method_string

Hope this helps!

Laravel相关问答推荐

Laravel-如何按第三表关系对数据进行分类

Laravel:通过数据透视表数据限制多对多Eager 加载

如何在Laravel中创建自定义单项集合

如何通过 Controller 访问 Laravel 中 Model 的值?

如何在自引用表上使用 Laravel 的 hasManyThrough

Laravel Eloquent 查找日期超过 2 天的行

指令allow_call_time_pass_reference警告

Laravel 不验证是否不需要字段

Laravel - 加载常见的页眉和页脚以查看

在 laravel 查询构建器中使用多个 where 子句

Laravel 中的合同和 PHP 中的接口有什么区别?

使用 vue-router 更改路由时中止所有 Axios 请求

如何使用外部图像生成 html div 的 screenshot截图?

约定表名(带下划线)

Laravel 项目旁边的 Wordpress 项目(在 public_html 文件夹中)

Laravel / Eloquent内存泄漏重复检索相同的记录

日期时间格式无效:1366 字符串值不正确

如何在 Eloquent Orm 中实现自引用(parent_id)模型

如何在 Laravel 中显示动态复选框的旧数据?

phpunit 命令不适用于 Windows 7 上的 laravel 4