It not work, I search so many ways, How can I change length of value in laravel 5

public function up()
{
    Schema::table('articles', function (Blueprint $table) {
        $table->string('name',50)->change();
    });
}

谢谢大家的阅读!

推荐答案

关于documentation,你的榜样应该行得通:

Schema::table('users', function ($table) {
    $table->string('name', 50)->change();
});

Just run php artisan migrate command to execute it.

Laravel相关问答推荐

为什么Laravel在API请求时返回BadMethodCallException?

用Laravel Filament创建变形组件

将错误消息抛出并显示为关联数组

LARAVEL 从多个表中获取重复的行

我在 laravel 中插入多个复选框值.我怎样才能做到这一点?

如何更改 laravel sanctum 返回message: Unauthenticated.

使用Laravel Blade Formatter和PHP Intelephense进行 VSCode 格式化

Laravel Blade:@stop VS @show VS @endsection VS @append

如何通过一个 laravel 安装处理子域

如何在 Laravel 5.5 中扩展 vendor 包服务提供者

Laravel whereDoesntHave() - 多个 OR 条件

laravel 5 中的登录事件处理

不支持驱动Driver[] - Laravel 5.3

laravel 4 - 如何限制(采取和跳过)Eloquent的 ORM?

如何在 Laravel Eloquent 中 Select 某些字段?

在 Laravel 中显示已注册的路由

Laravel assets资源与混合

Laravel Mix 生成字体到另一个目录

升级到 laravel 5.3 后错误 datetime format: 1292 Incorrect datetime value: '0000-00-00 00:00:00'

如果参数不是整数,如何以不同方式定义路由