Do you have an example of using this without using a facade? I usually avoid using facades in favour of dependency injection as it makes unit testing a bit easier, so I was wondering how I can allow the service container to inject the Salesforce object?
I tried injecting Davispeixoto\Laravel5Salesforce\Salesforce and however it throws an error "Call to a member function __setSoapHeaders() on null" from davispeixoto/force-dot-com-toolkit-for-php/src/Davispeixoto/ForceDotComToolkitForPhp/SforceBaseClient.php line 235
I achieved this by injecting Davispeixoto\Laravel5Salesforce\Salesforce and adding $this->app->alias('salesforce', Salesforce::class); in my Service Provider boot method
Do you have an example of using this without using a facade? I usually avoid using facades in favour of dependency injection as it makes unit testing a bit easier, so I was wondering how I can allow the service container to inject the Salesforce object?
I tried injecting
Davispeixoto\Laravel5Salesforce\Salesforce
and however it throws an error "Call to a member function __setSoapHeaders() on null" from davispeixoto/force-dot-com-toolkit-for-php/src/Davispeixoto/ForceDotComToolkitForPhp/SforceBaseClient.php line 235