【发布时间】:2017-07-19 16:14:29
【问题描述】:
我正在学习 Laravel 并使用
迁移数据库表php 工匠迁移
然后我得到一个错误
[Symfony\Component\Debug\Exception\FatalErrorException]
Call to undefined method Illuminate\Database\Schema\Blueprint::create_table()
它来自哪里?
这里是迁移的代码:
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTodoTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
//
Schema::create('todos', function (Blueprint $table) {
$table->increments('id');
$table->string('text');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
Schema::dropIfExists('todos');
}
}
【问题讨论】: