Category Archives for "Laravel"

Nov 11

Laravel Migrations: Write those Foreign Keys from the start!

By Diego | Laravel

“I see dead records…” has become a fairly common catch phrase for me in some projects lately. The dark practice of delaying the proper writing of the FKs in the migration files. Why devs fall into it and for what purpose is, most of the time,  shady at best.

I never found a good explanation for this practice. Read through, you may be another “Cole” from The Sixth Sense with the potential to save hundreds of lost records…

Continue reading