I am following all the steps for adding new column votes to the user table from laravel, still there isn't in the database? Please tell me where is my mistake? Firstly php artisan make:migration add_votes_to_users_table --table=users
public function up()
{
Schema::table('users', function (Blueprint $table) {
$table->integer('votes');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('users', function (Blueprint $table) {
$table->dropColumn('votes');
});
}
php artisan migrate
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire