Issue
I want to change my two table name in the Laravel, so do I have to manually change the table name or it can be possible through migration.
Solution
To change a table name, you can do this:
Schema::rename($currentTableName, $newTableName);
You can use the drop
or dropIfExists
methods to remove an existing table:
Schema::drop('users');
Schema::dropIfExists('users');
Just add that to a migration and it should work.
Answered By - GWed
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.