2016-11-24 17 views
0

は、この画像を見て:私の問題を解決するためにphp artisan migrateが失敗する理由:未定義のメソッドですか?

[symfony\component\debug\exception\fatalthrowableerror] 
call to undefined method illuminate\database\schema\blueprint::textarea<> 

どれソリューション:私はPHPの職人の移行を実行するとhttps://postimg.org/image/4fvu34juz/

、ディスプレイはありますか?

更新:

コード:

<?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'); 
    } 
} 
+0

マイグレーションを表示してください。 –

+0

@Alexey Mezenin、私の質問が更新されました –

+1

エラーはあなたがどこかで 'textarea'を使っていると言いますので、この移行を見つけて私たちに見せてください。 –

答えて

1

それはクラスBlueprinttextarea()という名前の関数が存在しないことを意味します。それを呼び出すコードを削除します。

+0

私はここに従います:https://laravel.com/docs/5.3/migrations –

+2

あなたの移行は大丈夫でしょうか、多分あなたのコードのどこか(別の移行スクリプトですか?)がtextarea()を呼び出しています。おそらくあなたが必要とするのは 'text()'メソッドです。 –

+0

解決済み。私はこれを見つけた。ありがとうございました –

関連する問題