diff --git a/Backend/Login.php b/Backend/Login.php index ff3c468..3064c03 100644 --- a/Backend/Login.php +++ b/Backend/Login.php @@ -19,7 +19,7 @@ if(isset($_POST['login'])){ if(password_verify($password, $hashedPassword )){ $_SESSION['groupName'] = $groupName; $_SESSION['success'] = "You are now logged in"; - header('location: Main.php?login=success'); + header('location: ../Frontend/group.php?login=success'); } } diff --git a/Backend/Models/keyWord.php b/Backend/Models/KeyWord.php similarity index 81% rename from Backend/Models/keyWord.php rename to Backend/Models/KeyWord.php index 7ee3f83..cd40593 100644 --- a/Backend/Models/keyWord.php +++ b/Backend/Models/KeyWord.php @@ -8,7 +8,7 @@ class KeyWord extends Eloquent{ public function group(){ - return $this->hasOne(Group::class); + return $this->belongsTo(Group::class); } } \ No newline at end of file diff --git a/Backend/keyWordsRemaining.php b/Backend/keyWordsRemaining.php new file mode 100644 index 0000000..e6be58c --- /dev/null +++ b/Backend/keyWordsRemaining.php @@ -0,0 +1,18 @@ +keyWord = $_POST['key_word']; + + $keyword->group()->associate(Group::find($_POST['group_id'])); + + if(!$keyword->save()){ + return; + } + +} \ No newline at end of file diff --git a/Frontend/group.php b/Frontend/group.php new file mode 100644 index 0000000..2e19180 --- /dev/null +++ b/Frontend/group.php @@ -0,0 +1,24 @@ + + + + + + + Title + + + + +
+ + + +
+ + + + \ No newline at end of file diff --git a/Frontend/index.html b/Frontend/index.html deleted file mode 100644 index 566549b..0000000 --- a/Frontend/index.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - - Title - - - - - \ No newline at end of file