Question: Easier way to pass
timbroder opened this issue · 1 comments
timbroder commented
Is there an easier way to pass a user email to the Client other than extending it in a service provider?
// Override pulkitjalan/google-apiclient
$this->app->extend('PulkitJalan\Google\Client', function ($command, $app) {
$config = $app['config']['google'];
$user = 'my@googledomain.com';
return new Client($config, $user);
});
Thanks!
pulkitjalan commented
there is not at the moment. you could try:
$user = 'my@googledomain.com';
$client->getClient()->setSubject($user);
// do other things...
Let me know if that works