Merge remote-tracking branch 'origin/main' into main
This commit is contained in:
commit
9ab0526608
|
@ -13,7 +13,7 @@ if(isset($_POST['login'])){
|
||||||
$groupName = $_POST["groupName"];
|
$groupName = $_POST["groupName"];
|
||||||
$password = $_POST["password"];
|
$password = $_POST["password"];
|
||||||
|
|
||||||
$group = Group::firstWhere('groupName', $groupName );
|
$group = Group::firstWhere('group_name', $groupName );
|
||||||
if($group){
|
if($group){
|
||||||
$hashedPassword = $group->password->password;
|
$hashedPassword = $group->password->password;
|
||||||
if(password_verify($password, $hashedPassword )){
|
if(password_verify($password, $hashedPassword )){
|
||||||
|
|
|
@ -20,9 +20,9 @@ if(isset($_POST['reg_group'])){
|
||||||
|
|
||||||
$group->gameJam()->associate(GameJam::find($_POST['gameJamId']));
|
$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()){
|
if(!$group->save()){
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -17,7 +17,7 @@ if (session_status() === PHP_SESSION_ACTIVE) {
|
||||||
$keyword = new KeyWord();
|
$keyword = new KeyWord();
|
||||||
|
|
||||||
//Take the keyWord the user typed and set it equal to the keyword valuable
|
//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
|
//Make foreign key from the groups table to the keyWords table
|
||||||
$keyword->group()->associate($group);
|
$keyword->group()->associate($group);
|
||||||
|
|
|
@ -5,7 +5,7 @@ use Illuminate\Database\Eloquent\Model as Eloquent;
|
||||||
class GameData extends Eloquent
|
class GameData extends Eloquent
|
||||||
{
|
{
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'gameLink', 'isWebBased', "img"
|
'game_link', 'is_web_Based', "img"
|
||||||
];
|
];
|
||||||
|
|
||||||
public function group(){
|
public function group(){
|
||||||
|
|
|
@ -6,9 +6,9 @@ class GameJam extends Eloquent{
|
||||||
|
|
||||||
protected $fillable =[
|
protected $fillable =[
|
||||||
'name',
|
'name',
|
||||||
'startTime',
|
'start_time',
|
||||||
'endTime',
|
'end_time',
|
||||||
'keyWord',
|
'key_word',
|
||||||
'description'
|
'description'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ use Illuminate\Database\Eloquent\Model as Eloquent;
|
||||||
class Group extends Eloquent
|
class Group extends Eloquent
|
||||||
{
|
{
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'groupName', 'groupAmount', 'votes'
|
'group_name', 'group_amount', 'votes'
|
||||||
];
|
];
|
||||||
|
|
||||||
public function gameJam(){
|
public function gameJam(){
|
||||||
|
|
|
@ -3,7 +3,7 @@ namespace Backend\Models;
|
||||||
use Illuminate\Database\Eloquent\Model as Eloquent;
|
use Illuminate\Database\Eloquent\Model as Eloquent;
|
||||||
class KeyWord extends Eloquent{
|
class KeyWord extends Eloquent{
|
||||||
protected $fillable =[
|
protected $fillable =[
|
||||||
'keyWord'
|
'key_word'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue