在Laravel模式中创建一个价格列

12 浏览
0 Comments

在Laravel模式中创建一个价格列

我想在Laravel模式中创建一个价格列。

public function up()
{
    Schema::create('cameras', function (Blueprint $table) {
        $table->increments('id');
        $table->string('name');
        $table->string('condition');
        $table->string('price');
        $table->string('type');
        $table->timestamps();
    });
}

或者有没有其他的数据类型可以使用?因为我在文档中没有看到任何关于货币值的内容。感谢任何帮助。

0