Game-Jaming/Backend/keyWordsRemaining.php

18 lines
320 B
PHP

<?php
require "../bootstrap.php";
use Backend\Models\Group;
use Backend\Models\KeyWord;
if(isset($_POST['submitKeyWord'])){
$keyword = new KeyWord();
$keyword->keyWord = $_POST['key_word'];
$keyword->group()->associate(Group::find($_POST['group_id']));
if(!$keyword->save()){
return;
}
}