Download the PHP package mncee/salesforce-sync without Composer
On this page you can find all versions of the php package mncee/salesforce-sync. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mncee/salesforce-sync
More information about mncee/salesforce-sync
Files in mncee/salesforce-sync
Package salesforce-sync
Short Description Package for syncing Salesforce objects with local data
License MIT
Informations about the package salesforce-sync
Salesforce Sync
This package is for syncing Salesforce objects with local data in a Laravel app.
Works with Laravel 9, 10, and 11.
Use version ^1.0
for Laravel 5
Installation
This package can be installed via Composer by requiring the mncee/salesforce-sync
package.
Laravel Configuration
Environment Variables
Include the following environment variables in the .env
file:
Place your your Enterprise WSDL file into your app storage/app/
directory you specified in the .env
file.
IMPORTANT: This package only works with Enterprise WSDL
Package Discovery
This packages Service Provider and Facade alias should be auto-discovered when requiring it with composer
.
But if you need to add them manually, you can do so with the following instructions:
For Laravel 11
In the bootstrap/providers.php
file add CEE\Salesforce\Laravel\SalesforceServiceProvider::class
to the returned array.
In the config/app.php
file add these corresponding lines to the returned array.
For Laravel 9 and 10
Find the providers
key and aliases
key in your config/app.php
and add these corresponding lines to the returned array.
The SyncObject Class
This is the class to use for syncing local data with remote Salesforce objects.
Sub-class usage
Classes that inherit this class can perform functions for syncing (pushing and pulling) with a remote Salesforce object.
Functions need to be defined for pushing and pulling Salesforce object fields, and must use this naming convention:
The push_...()
functions should return a value that is to be pushed to the corresponding <Salesforce field name>
of the remote Salesforce object.
The pull_...($value)
functions will have an argument containing the value corresponding to the <Salesforce field name>
of the remote Salesforce object that can be used to update local data.
It is not required to have both a push_...()
and a pull_...()
function for a given Salesforce field. Either or both can be used according to what is needed for syncing in either direction.
Static objectName()
function and chaining usage
This class can also be used on it's own using the chaining functions: