Modify the User table

-3

You see, I have the User table, which is the one that stores the users of my database. I am interested in adding a variable balance, so that said user can make purchases online. I'm looking at 2 options: -The first is to modify User.php to add a balance variable. This table does not have a migration like the others, hence my question. -The other option is to create a table for credit cards, with balance and foreign keys to a user.

The question is, how do I enter migrations to the User table?

    
asked by Miguel Alparez 16.02.2018 в 13:45
source

1 answer

0

First of all I do not understand why you say that the Users table does not have a migration, if in fact it is the first of two migrations that Laravel includes by default:

link

Next, if you want to make modifications to the User table, simply follow the documentation of migrations, even if you have an example directly with the Users table:

link

Schema::table('users', function (Blueprint $table) {
    $table->integer('saldo');
});
    
answered by 16.02.2018 в 15:14