public function validateToken($token, $secret, $algorithm = 'HS256')
    {
        try {
            JWT::decode($token, $secret, [$algorithm]);
        } catch(\Exception $e) {
            return false;
        }

        return true;
    }
public function validateToken($token, $secret, $algorithm = 'HS256')
    {
        try {
            JWT::decode($token, $secret, [$algorithm]);
        } catch(\Exception $e) {
            return false;
        }

        return true;
    }
public function validateToken ( $ token , $ secret , $ algorithm = 'HS256' ) { try { JWT :: decode ( $ token , $ secret , [ $ algorithm ] ) ; } catch ( \ Exception $ e ) { return false ; } return true ; }
Validate that the provided token

@param string $token
@param string $secret
@param string $algorithm

@return bool
Validate that the provided token