emw3 / salesforceclient
Laravel Package for Salesforce REST API
This package's canonical repository appears to be gone and the package has been frozen as a result.
Installs: 47 910
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: >=5.5.9
This package is not auto-updated.
Last update: 2023-06-28 22:58:43 UTC
README
A helper package to use Salesforce REST API via Facade.
Installation
First, pull in the package through Composer.
composer require "emw3/salesforceclient:v1.0"
Include the service provider within config\app.php
.
'providers' => [ Emw3\SalesforceClient\SalesforceClientServiceProvider::class, ];
Add a facade alias.
'aliases' => [ 'SFDC' => Emw3\SalesforceClient\Facades\SalesforceClientFacade::class, ];
Add .env variables.
SFDC_INSTANCE=https://<Instance>.salesforce.com SFDC_API_VERSION=<API Version> SFDC_CLIENT_ID=<Consumer Key> SFDC_CLIENT_SECRET=<Consumer Secret> SFDC_EMAIL=<Salesforce Login> SFDC_PASSWORD=<Salesforce Password> SFDC_ACCESS_TOKEN=<Salesforce Security Token>
Usage
Within any Controller.
use SFDC; public function index() { $create_account = SFDC::create( 'Account', ['Name' => 'New Account'] ); $id = $create_account['Id']; return view('home', ['id' => $id]); }