Game-Jaming/Backend/keyWordsRemaining.php

18 lines
320 B
PHP
Raw Normal View History

2021-03-05 09:52:42 +00:00
<?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;
}
}