2 years ago

SQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint

Posted 2 years ago by venkat1806

I know there are many threads related to this error. I have gone through most of them but still i could not resolve it

two files


       Schema::create('posts', function (Blueprint $table) {


        Schema::create('updates', function (Blueprint $table) {
    Schema::table('updates', function ($table) {

$table->engine=InnoDB; in config/database.php under mysql

Please help fixing the error.

Please sign in or create an account to participate in this conversation.