Download the PHP package synergitech/laravel-salesforce without Composer
On this page you can find all versions of the php package synergitech/laravel-salesforce. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download synergitech/laravel-salesforce
More information about synergitech/laravel-salesforce
Files in synergitech/laravel-salesforce
Package laravel-salesforce
Short Description This package uses omniphx/forrest to provide an Eloquent-style way of querying sObjects from Salesforce.
License MIT
Informations about the package laravel-salesforce
Laravel Salesforce
This package uses omniphx/forrest to provide an Eloquent-style way of querying sObjects from Salesforce.
:warning: This is an initial version that only allows for the selecting of data. Newer versions will aim to provide a more complete experience.
Getting Started
Follow the instructions provided at omniphx/forrest to connect to your Salesforce environment.
Once done, you can then use the SynergiTech\Salesforce\Facades\Salesforce
facade to perform queries against a particular table like so:
Available Methods
find
Allows you to directly pull an individual record as an array by Id. You can also specify another field name as the second parameter. If you specify a non-unique column and multiple records are returned then the first record is always returned.
Usage
findMany
Allows you to directly pull multiple records as a Laravel Collection by provide an array of their respective Id fields. You can also specify another field name as the second parameter.
Usage
create
Allows you to create a new record on the specified table using an array of fields.
Usage
Expected Response
update
Allows you to update a record using it's Salesforce Id with an array of fields.
Usage
Expected Response
See 'create' above
createOrUpdate
Allows you to upsert a record using an Id field and the associated value.
Usage
Expected Response
delete
Allows you to delete a record by it's Id, returning true if successful.
Usage
Query Builder
This package allows you to scope your get calls using query builder methods.
Query builders cannot currently be used in conjunction with the update
or delete
methods (sorry 🙏).
where
You can also scope your queries with where clauses.
whereIn
You can provide an array of possible values to the whereIn
method to select any records that match any of the values.
orderBy
You can order by a particular field in either ascending or descending order.
nullsLast
By default when chaining an orderBy null values are returned first.
You can chain on ->nullsLast()
to return null values last.
limit
You can limit the amount of records returned.
Exceptions
By default omniphx/forrest typically throws a single exception with more detail contained within a JSON encoded string. We've wrapped some with our own exceptions to help with debugging.
All versions of laravel-salesforce with dependencies
illuminate/collections Version ^8.0 || ^9.0 || ^10.0
illuminate/support Version ^8.0 || ^9.0 || ^10.0
omniphx/forrest Version ^2.0