-4
我的代碼:Laravel遷移致命錯誤:調用未定義的方法照亮數據庫架構藍圖:: integar()
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTasksTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('tasks', function (Blueprint $table) {
$table->increments('id');
$table->integar('user_id')->index();
$table->string('name');
$table->string('food');
$table->string('quantity');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('tasks');
}
}
在這裏猜測,該方法實際上被稱爲*整數* ...!? – deceze
這個問題應該贏得某種獎勵:-p – malhal