Closed RhysLees closed 2 years ago
I can not call it non-static either as its construct method requires "SearchConsoleClient $client"
I guess you missing the
use SearchConsole;
statement in your class
I guess you missing the
use SearchConsole;
statement in your class
nope, its included, SearchConsole::setAccessToken() is not a stactic method
/**
* @param string|array $accessToken
*
* @return $this
*/
public function setAccessToken($accessToken)
{
....
}
should be
/**
* @param string|array $accessToken
*
* @return $this
*/
public static function setAccessToken($accessToken)
{
....
}
@RhysLees any solution on this issue?? am currently stuck here
@kingzamzon the only thing I can suggest is to fork the repo and make the change above
@RhysLees I made the changes but got more error on my end.. do you have a fork?
@RhysLees I made the changes but got more error on my end.. do you have a fork?
No sorry
How were you able to sort yours out?
How were you able to sort yours out?
Just didn't use this package. I used a spatie package instead
Hi,
it definitely works with use SearchConsole;
like the last 5 years.
NOT "use SchulzeFelix\SearchConsole\SearchConsole;"!
@RhysLees Which Spatie package you using for the SearchConsole?
When i use:
$sites = SearchConsole::setAccessToken($token)->listSites(); return $sites;
i get the following error: Non-static method SchulzeFelix\SearchConsole\SearchConsole::setAccessToken() cannot be called statically