remove username from controller and migration

This commit is contained in:
Too
2018-07-02 10:31:42 +08:00
parent e5b63e2c98
commit 2c2c3928e9
3 changed files with 33 additions and 2 deletions
@@ -70,7 +70,6 @@ class RegisterController extends Controller
$role = Role::where('name','=','member')->first();
$user = new User();
$user->name = $data['name'];
$user->email = $data['email'];
$user->password = bcrypt($data['password']);
$user->save();
@@ -0,0 +1,32 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class RemoveUserInUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('users', function (Blueprint $table) {
$table->dropColumn('name');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('users', function (Blueprint $table) {
$table->string('name');
});
}
}
+1 -1
View File
@@ -46,7 +46,7 @@
<!-- Password Confirmation -->
<div class="form-group row">
<label class="col-md-3 col-form-label text-md-right">{{ $t('confirm_password') }}</label>
<label class="col-md-3 col-form-label text-md-right">{{ $t('confirm_pass') }}</label>
<div class="col-md-7">
<el-input v-if="password_confirmation_visible" v-model="form.password_confirmation" :class="{ 'is-invalid': form.errors.has('password_confirmation') }" type="text" name="password_confirmation" placeholder="Confirm Password">
<template slot="append">