Merhaba,
excel den veri yükleme yaparken SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails
hatası alıyorum.
İlişkilerim şöyle;
Schema::create('u_o_d_sorus', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('baslik');
$table->unsignedBigInteger('gorev_tip_id');
$table->foreign('gorev_tip_id')->references('id')->on('gorev_tips');
});
Schema::create('gorev_tips', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('aciklama',50);
$table->timestamps();
});
Araştırdım ama çözemedim, öneriniz var mı ?