groups get tokens
This commit is contained in:
parent
46afda4622
commit
c61f221503
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
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);
|
||||
}
|
Loading…
Reference in New Issue