1 year ago

#271203

test-img

phpnewbie

How to bypass/disable Foreign Key Constraints on Laravel Queries

Laminas\Db\Adapter\Exception\InvalidQueryException Statement could not be executed (23000 - 1452 - Cannot add or update a child row: a foreign key constraint fails (lms.student_course_logs, CONSTRAINT student_course_logs_lecture_id_foreign FOREIGN KEY (lecture_id) REFERENCES courses (id) ON DELETE CASCADE)) http://localhost/public/student/course/loglecture

I'm having this foreign key constraints in my query. How do I solve this one? Would it be possible to bypass foreign key contraints?

Here's my error log: https://flareapp.io/share/omwaaZR7#F51

Thank you.

php

laravel

laminas

0 Answers

Your Answer

Accepted video resources