How to seed tables orderly to avoid "Integrity constraint violation" in Laravel 9.x
I have a bookstore project, and have 2 table: publishers and books. These is my two migrate file for books and publishers. <?php use IlluminateSupportFacadesSchema; use IlluminateDatabaseSchemaBlueprint; use IlluminateDatabaseMigrationsMigration; class CreateBooksTable extends Migration { /** * Run the migrations. *…