Issue
I've been watching a tutorial on Laravel and there is $table->bigIncrements("id") in a migration file, but when I open the same file there is $table->id() function.
Questions:
Was there any update in which bigIncrements was replaced by id()? I've been searching the net for a while but haven't found anything about it.
Do these functions do the same? Is there any difference between them?
Solution
When you are in doubt like that, always go to the source of truth... In this case it is open source, so go to GitHub and look for yourself... This is what all devs do...
So, if you look at Laravel 6.x, they used bigIncrements
, but if you look on Laravel 7.x+, you will see they use id
now...
More info on the Framework source code...
Answered By - matiaslauriti Answer Checked By - Mary Flores (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.