<?php

namespace App\Http\Controllers\API;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Services\TokenService;

class TokenController extends Controller
{
    public function TokenRefresh(Request $request )  //token 过期调用此方法
    {
        $token=request()->header('Authorization');;
        $service=app()->make(TokenService::class);
        $s=$service->RefreshToken(['token'=>$token]);

//        // var_dump($m);
        if(!$s['status']){
            $s['status']=false;
        }
        return $s;
    }
}
