Game-Jaming/Backend/Controllers/Group/UpdateGruop.php

25 lines
501 B
PHP
Raw Normal View History

2021-03-09 09:45:05 +00:00
<?php
require "../../../bootstrap.php";
use Backend\Models\Group;
session_start();
if (isset($_POST['updateGroup'])) {
2021-03-09 12:16:34 +00:00
if($group = Group::find($_POST['groupId'])){
if ($group->password->remember_token === $_SESSION['token']){
$group->group_name = $_POST['groupName'];
$group->group_amount = $_POST['groupAmount'];
$group->game_jam_id = $_POST['gameJamId'];
2021-03-09 12:16:34 +00:00
$group->save();
}
}
2021-03-09 09:45:05 +00:00
}
2021-03-09 12:16:34 +00:00
2021-03-09 09:45:05 +00:00