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

17 lines
329 B
PHP
Raw Normal View History

2021-03-09 12:29:49 +00:00
<?php
2021-03-09 12:38:19 +00:00
namespace Backend\Controllers;
2021-03-09 12:29:49 +00:00
require "../../../bootstrap.php";
use Backend\Models\Group;
use Backend\Models\Password;
/**
* @param string $token
* @return Group;
*/
function groupViaToken(string $token){
$password = Password::firstWhere('remember_token', $token);
return Group::find($password->group_id);
}