<?php

namespace App\Http\Traits;

use App\Models\PersonalAccessToken;

trait InvalidTokenCheck
{

    public function getCreator($request)
    {
        $authorizationHeader = $request->header('Authorization');
        $tokenData = PersonalAccessToken ::where('token', $authorizationHeader)->first();
        return $tokenData -> tokenable_id;
    }
}
