Laravel\SparkInstaller\InteractsWithSparkConfiguration::readToken PHP Method

readToken() protected method

Get the Spark API token from the configuration file.
protected readToken ( ) : string
return string
    protected function readToken()
    {
        if (!$this->configExists()) {
            throw new Exception("Spark configuration file not found. Please register a token.");
        }
        return json_decode(file_get_contents($this->configPath()), true)['token'];
    }