Skip to content

Commit

Permalink
fix database insert nickname and fillable
Browse files Browse the repository at this point in the history
  • Loading branch information
danivideda committed Dec 1, 2020
1 parent a7d9417 commit d6996a5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/Http/Controllers/Auth/RegisterController.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public function registerStudent(Request $request) {

Student::create([
'name' => $request->name,
'nickname' => $request->nickname,
'email' => $request->email,
'password' => Hash::make($request->password)
]);
Expand All @@ -49,6 +50,7 @@ public function registerTeacher(Request $request) {

Teacher::create([
'name' => $request->name,
'nickname' => $request->nickname,
'school_name' => $request->school_name,
'email' => $request->email,
'password' => Hash::make($request->password)
Expand Down
1 change: 1 addition & 0 deletions app/Models/Student.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class Student extends Authenticatable

protected $fillable = [
'name',
'nickname',
'email',
'password'
];
Expand Down
1 change: 1 addition & 0 deletions app/Models/Teacher.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class Teacher extends Authenticatable

protected $fillable = [
'name',
'nickname',
'school_name',
'email',
'password'
Expand Down

0 comments on commit d6996a5

Please sign in to comment.