model update

This commit is contained in:
2021-03-08 13:09:50 +01:00
parent 4eb443cd1c
commit 44c8fc828c
7 changed files with 10 additions and 10 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ if(isset($_POST['login'])){
$groupName = $_POST["groupName"];
$password = $_POST["password"];
$group = Group::firstWhere('groupName', $groupName );
$group = Group::firstWhere('group_name', $groupName );
if($group){
$hashedPassword = $group->password->password;
if(password_verify($password, $hashedPassword )){
+2 -2
View File
@@ -20,9 +20,9 @@ if(isset($_POST['reg_group'])){
$group->gameJam()->associate(GameJam::find($_POST['gameJamId']));
$group->groupName = $groupName = $_POST['groupName'];
$group->group_name = $groupName = $_POST['groupName'];
$group->groupAmount = $_POST['groupAmount'];
$group->group_amount = $_POST['groupAmount'];
if(!$group->save()){
return;
+1 -1
View File
@@ -17,7 +17,7 @@ if (session_status() === PHP_SESSION_ACTIVE) {
$keyword = new KeyWord();
//Take the keyWord the user typed and set it equal to the keyword valuable
$keyword->keyWord = $_POST['key_word'];
$keyword->key_word = $_POST['key_word'];
//Make foreign key from the groups table to the keyWords table
$keyword->group()->associate($group);