1
私はLaravelを学習して、データベースのテーブルを移行していますLaravel:未定義のメソッドを照らしデータベーススキーマ青写真に呼び出し::)(CREATE_TABLE
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');
}
}
ええ、私はcreate_tableという名前を使用しましたが、名前をcreateに変更しました。エラーはコマンドduの後に続きます(これは私が想定しているリセットです)。ただし、RegisterController.phpにはcreate_tableという関数がありますが、これは元のcreate user migrationの一部です。 – puolimatkankrouvi
@puolimatkankrouviこれを 'RegisterController'でも修正します。それができない場合は、このコントローラを表示してください。 –
私はcreate_table - > createを見つけて置き換えて、どこにでも変更して、今は動作します。 – puolimatkankrouvi