<?php

namespace App;



use Illuminate\Support\Facades\Cache;

class UserToken
{
    static function getUser($token){
        $id=Cache::get('tokenStr_'.$token);
        if(!$id)return null;
        $user= User::find($id);
        $user->touchToken();
        return $user;
    }
}
