Skip to content

This Readme provides the errors I fetched during doing my project and solutions.

Notifications You must be signed in to change notification settings

DevAbdulAlimRony/Laravel-Error-Solved

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

Laravel Error and Solution

This Readme provides the errors I fetched during doing my project and solutions.

Migration: Cannot add foreign key constraint

  • Problem

    • Everything was fine. My migration file already had proper foreign keys, but still occured the same error again and again. Well, after a long run, I have just figured out something. I made my parent model's migration after making the child model's migration.
  • Solution

    • Don't make the child migration first. Make Parent Model's Migration, then go to the Child.
    • Ex. Profile belongs to a User. If you make Profile migration at first and then User migration, then you will get the error. Copy all migration's code, delete them, and again create the migrations- User and Profile respectively.

About

This Readme provides the errors I fetched during doing my project and solutions.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published