为什么 php artisan migrate 失败:未定义的方法?
Why php artisan migrate fails: undefined method?
看这张图:https://postimg.org/image/4fvu34juz/
当我运行 php artisan迁移时,有显示:
[symfony\component\debug\exception\fatalthrowableerror]
call to undefined method illuminate\database\schema\blueprint::textarea<>
有什么办法可以解决我的问题吗?
更新:
代码:
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateFlightTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
//
Schema::create('flights', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('airline');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
Schema::drop('flights');
}
}
表示classBlueprint
中没有名为textarea()
的函数。删除调用它的代码。
看这张图:https://postimg.org/image/4fvu34juz/
当我运行 php artisan迁移时,有显示:
[symfony\component\debug\exception\fatalthrowableerror]
call to undefined method illuminate\database\schema\blueprint::textarea<>
有什么办法可以解决我的问题吗?
更新:
代码:
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateFlightTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
//
Schema::create('flights', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('airline');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
Schema::drop('flights');
}
}
表示classBlueprint
中没有名为textarea()
的函数。删除调用它的代码。