diff --git a/IES-Bandung/app/Http/Controllers/Auth/AuthController.php b/IES-Bandung/app/Http/Controllers/Auth/AuthController.php index 6c5d32c8a106b67df5f0301e97731a84e3a8329d..f59c80a2cd8dbcdf0f40f87c7014f41b882ac4b0 100755 --- a/IES-Bandung/app/Http/Controllers/Auth/AuthController.php +++ b/IES-Bandung/app/Http/Controllers/Auth/AuthController.php @@ -54,7 +54,7 @@ class AuthController extends Controller 'username' => 'required|max:255|unique:users', 'email' => 'required|email|max:255|unique:users', 'password' => 'required|min:6|confirmed', - 'user_nik' => 'required|max:255|unique:users', + 'nik' => 'required|max:255|unique:users', 'full_name' => 'required|max:255', 'birth_date' => 'required|date', 'birth_place' => 'required|max:255', @@ -76,7 +76,7 @@ class AuthController extends Controller 'username' => $data['username'], 'email' => $data['email'], 'password' => bcrypt($data['password']), - 'user_nik' => $data['user_nik'], + 'nik' => $data['nik'], 'full_name' => $data['full_name'], 'birth_date' => $data['birth_date'], 'birth_place' => $data['birth_place'], diff --git a/IES-Bandung/app/User.php b/IES-Bandung/app/User.php index 7ff245a5481403cfd281281975b39766687b03ec..53e3a0b67f018773683fc344c384e67d6d7ed1a3 100755 --- a/IES-Bandung/app/User.php +++ b/IES-Bandung/app/User.php @@ -12,7 +12,7 @@ class User extends Authenticatable * @var array */ protected $fillable = [ - 'username', 'email', 'password', 'user_nik', 'full_name', 'birth_date', 'birth_place', 'tel_no', 'type' + 'username', 'email', 'password', 'nik', 'full_name', 'birth_date', 'birth_place', 'tel_no', 'type' ]; /** diff --git a/IES-Bandung/database/migrations/2014_10_12_000000_create_users_table.php b/IES-Bandung/database/migrations/2014_10_12_000000_create_users_table.php index e0f135e68de75871ec90a76ecef604fcd75600ab..9c29130faaa2af3166e3735e068da0880c94cfd8 100755 --- a/IES-Bandung/database/migrations/2014_10_12_000000_create_users_table.php +++ b/IES-Bandung/database/migrations/2014_10_12_000000_create_users_table.php @@ -17,7 +17,7 @@ class CreateUsersTable extends Migration $table->string('username')->unique(); $table->string('email')->unique(); $table->string('password'); - $table->bigInteger('user_nik')->unique(); + $table->bigInteger('nik')->unique(); $table->string('full_name'); $table->date('birth_date'); $table->string('birth_place'); diff --git a/IES-Bandung/database/migrations/2016_04_06_020321_user_log.php b/IES-Bandung/database/migrations/2016_04_06_020321_user_log.php index 726de1cd2dba02e651e1e953909f83103147fcff..120a9aff22e8e5791164bd5006b0df9713ce534f 100644 --- a/IES-Bandung/database/migrations/2016_04_06_020321_user_log.php +++ b/IES-Bandung/database/migrations/2016_04_06_020321_user_log.php @@ -19,7 +19,7 @@ class UserLog extends Migration $table->string('email'); $table->string('old_password')->nullable(); $table->string('new_password')->nullable(); - $table->bigInteger('user_nik'); + $table->bigInteger('nik'); $table->string('full_name'); $table->date('birth_date'); $table->string('birth_place'); diff --git a/IES-Bandung/database/migrations/2016_04_06_051454_user_log_after_insert_trigger.php b/IES-Bandung/database/migrations/2016_04_06_051454_user_log_after_insert_trigger.php index c8ca7131f75ad7856d253d4f6a2e69f25d8adbed..a1f07fe6d775d0d37426788716f2c6683a686d48 100644 --- a/IES-Bandung/database/migrations/2016_04_06_051454_user_log_after_insert_trigger.php +++ b/IES-Bandung/database/migrations/2016_04_06_051454_user_log_after_insert_trigger.php @@ -25,7 +25,7 @@ class UserLogAfterInsertTrigger extends Migration email = NEW.email, old_password = NULL, new_password = NEW.password, - user_nik = NEW.user_nik, + nik = NEW.nik, full_name = NEW.full_name, birth_date = NEW.birth_date, birth_place = NEW.birth_place, diff --git a/IES-Bandung/database/migrations/2016_04_06_054018_user_log_after_update_trigger.php b/IES-Bandung/database/migrations/2016_04_06_054018_user_log_after_update_trigger.php index 4e2750f157f899b4aaa6d6ecddceb2fec8f0cce5..9e949224f8a4843de98ae76a355cee8071be99b1 100644 --- a/IES-Bandung/database/migrations/2016_04_06_054018_user_log_after_update_trigger.php +++ b/IES-Bandung/database/migrations/2016_04_06_054018_user_log_after_update_trigger.php @@ -25,7 +25,7 @@ class UserLogAfterUpdateTrigger extends Migration email = NEW.email, old_password = OLD.password, new_password = NEW.password, - user_nik = NEW.user_nik, + nik = NEW.nik, full_name = NEW.full_name, birth_date = NEW.birth_date, birth_place = NEW.birth_place, diff --git a/IES-Bandung/resources/views/auth/register.blade.php b/IES-Bandung/resources/views/auth/register.blade.php index cd814fda155f24e8b520528a393ed8ae332ef961..99709954097a689aef6e76963c3d04b3d845a831 100755 --- a/IES-Bandung/resources/views/auth/register.blade.php +++ b/IES-Bandung/resources/views/auth/register.blade.php @@ -80,10 +80,10 @@ <div class="col-lg-6"> <div class="form-group"> - <input type="text" placeholder="Nomor KTP (NIK)" class="form-control" name="user_nik" value="{{ old('user_nik') }}" required> - @if ($errors->has('user_nik')) + <input type="text" placeholder="Nomor KTP (NIK)" class="form-control" name="nik" value="{{ old('nik') }}" required> + @if ($errors->has('nik')) <span class="help-block"> - <strong>{{ $errors->first('user_nik') }}</strong> + <strong>{{ $errors->first('nik') }}</strong> </span> @endif </div> diff --git a/database-sql/db_ies_bandung_core.sql b/database-sql/db_ies_bandung_core.sql index 160c86e776d30945170ffbad451aff893ca694ce..402161919834693d4883583e6c1f7df73b5bbcbf 100755 --- a/database-sql/db_ies_bandung_core.sql +++ b/database-sql/db_ies_bandung_core.sql @@ -9,7 +9,7 @@ USE db_ies_bandung_core; -- Table structure for table `User` CREATE TABLE `User` ( `userID` INTEGER(10) NOT NULL AUTO_INCREMENT, - `user_nik` INTEGER(20) NOT NULL, + `nik` INTEGER(20) NOT NULL, `username` VARCHAR(255) NOT NULL, `full_name` VARCHAR(255) NOT NULL, `birth_date` DATE NOT NULL, diff --git a/database-sql/triggers/users_log_AFTER_INSERT_TRIGGER.sql b/database-sql/triggers/users_log_AFTER_INSERT_TRIGGER.sql index a95a3a2aa3b9f0b20c8759dc8910f1f95999ece1..de9dabfc108d83d5dfb26b9c29aa5ee48ec8acae 100644 --- a/database-sql/triggers/users_log_AFTER_INSERT_TRIGGER.sql +++ b/database-sql/triggers/users_log_AFTER_INSERT_TRIGGER.sql @@ -10,7 +10,7 @@ CREATE TRIGGER users_log_AFTER_INSERT_TRIGGER email = NEW.email, NEW_password = NULL, new_password = NEW.password, - user_nik = NEW.user_nik, + nik = NEW.nik, full_name = NEW.full_name, birth_date = NEW.birth_date, birth_place = NEW.birth_place,