samuel toh
samuel toh

Reputation: 7076

Why php artisan migrate fails: undefined method?

Look this image : https://postimg.org/image/4fvu34juz/

When I run php artisan migrate, there is display :

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

Any solution to solve my problem?

Update :

Code :

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

Upvotes: 0

Views: 764

Answers (1)

Zamrony P. Juhara
Zamrony P. Juhara

Reputation: 5262

It means there is no function named textarea() in class Blueprint. Remove code that call it.

Upvotes: 1

Related Questions