{"id":22916658,"url":"https://github.com/synergitech/laravel-salesforce","last_synced_at":"2026-04-20T03:01:43.004Z","repository":{"id":131919034,"uuid":"610778654","full_name":"SynergiTech/laravel-salesforce","owner":"SynergiTech","description":"This package uses omniphx/forrest to provide an Eloquent-style way of querying sObjects from Salesforce.","archived":false,"fork":false,"pushed_at":"2025-07-07T14:37:29.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-10-06T09:44:24.521Z","etag":null,"topics":["laravel","salesforce"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SynergiTech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-07T13:17:12.000Z","updated_at":"2025-07-07T14:36:28.000Z","dependencies_parsed_at":"2025-02-07T07:50:34.372Z","dependency_job_id":null,"html_url":"https://github.com/SynergiTech/laravel-salesforce","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/SynergiTech/laravel-salesforce","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SynergiTech%2Flaravel-salesforce","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SynergiTech%2Flaravel-salesforce/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SynergiTech%2Flaravel-salesforce/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SynergiTech%2Flaravel-salesforce/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SynergiTech","download_url":"https://codeload.github.com/SynergiTech/laravel-salesforce/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SynergiTech%2Flaravel-salesforce/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32031070,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T00:18:06.643Z","status":"online","status_checked_at":"2026-04-20T02:00:06.527Z","response_time":94,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["laravel","salesforce"],"created_at":"2024-12-14T06:14:08.901Z","updated_at":"2026-04-20T03:01:42.975Z","avatar_url":"https://github.com/SynergiTech.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laravel Salesforce\r\n\r\n[![Tests](https://github.com/SynergiTech/laravel-salesforce/actions/workflows/test.yml/badge.svg)](https://github.com/SynergiTech/laravel-salesforce/actions/workflows/test.yml)\r\n\r\nThis package uses [omniphx/forrest](https://github.com/omniphx/forrest) to provide an Eloquent-style way of querying sObjects from Salesforce.\r\n\r\n:warning: This is an initial version that only allows for the selecting of data. Newer versions will aim to provide a more complete experience.\r\n\r\n## Getting Started\r\n\r\nFollow the instructions provided at [omniphx/forrest](https://github.com/omniphx/forrest) to connect to your Salesforce environment.\r\nOnce done, you can then use the `SynergiTech\\Salesforce\\Facades\\Salesforce` facade to perform queries against a particular table like so:\r\n\r\n```php\r\nuse SynergiTech\\Salesforce\\Facades\\Salesforce;\r\n\r\n// Get an individual record by Id\r\nSalesforce::table('MyTable')-\u003efind('YourIdHere');\r\n```\r\n\r\n## Available Methods\r\n\r\n### find\r\n\r\nAllows you to directly pull an individual record as an array by Id.\r\nYou can also specify another field name as the second parameter.\r\nIf you specify a non-unique column and multiple records are returned then the first record is always returned.\r\n\r\n#### Usage\r\n\r\n```php\r\nSalesforce::table('MyTable')-\u003efind('YourIdHere');\r\n```\r\n\r\n### findMany\r\n\r\nAllows you to directly pull multiple records as a Laravel Collection by provide an array of their respective Id fields.\r\nYou can also specify another field name as the second parameter.\r\n\r\n#### Usage\r\n\r\n```php\r\nSalesforce::table('MyTable')-\u003efindMany(['YourId1Here', 'YourId2Here']);\r\n```\r\n\r\n### create\r\n\r\nAllows you to create a new record on the specified table using an array of fields.\r\n\r\n#### Usage\r\n\r\n```php\r\n$response = Salesforce::table('MyTable')-\u003ecreate([\r\n    'Name' =\u003e 'John Doe',\r\n]);\r\n```\r\n\r\n#### Expected Response\r\n\r\n```php\r\n[\r\n    'id' =\u003e '', // Salesforce Id\r\n    'success' =\u003e true,\r\n    'errors' =\u003e [],\r\n    'data' =\u003e [\r\n        // Full record data\r\n    ],\r\n]\r\n```\r\n\r\n### update\r\n\r\nAllows you to update a record using it's Salesforce Id with an array of fields.\r\n\r\n#### Usage\r\n\r\n```php\r\n$response = Salesforce::table('MyTable')-\u003eupdate('Id', [\r\n    'Name' =\u003e 'John Doe',\r\n]);\r\n```\r\n\r\n#### Expected Response\r\n\r\nSee 'create' above\r\n\r\n### createOrUpdate\r\n\r\nAllows you to upsert a record using an Id field and the associated value.\r\n\r\n#### Usage\r\n\r\n```php\r\n$response = Salesforce::table('MyTable')-\u003ecreateOrUpdate('My_External_Id__c', 'ExternalId', [\r\n    'Name' =\u003e 'John Doe',\r\n]);\r\n```\r\n\r\n#### Expected Response\r\n\r\n```php\r\n[\r\n    'id' =\u003e '', // Salesforce Id\r\n    'success' =\u003e true,\r\n    'errors' =\u003e [],\r\n    'created' =\u003e true, // True/False depending on whether the record was created or updated\r\n    'data' =\u003e [\r\n        // Full record data\r\n    ],\r\n]\r\n```\r\n\r\n### delete\r\n\r\nAllows you to delete a record by it's Id, returning true if successful.\r\n\r\n#### Usage\r\n\r\n```php\r\nSalesforce::table('MyTable')-\u003edelete('Id');\r\n```\r\n\r\n## Query Builder\r\n\r\nThis package allows you to scope your get calls using query builder methods.\r\nQuery builders **cannot** currently be used in conjunction with the `update` or `delete` methods (sorry 🙏).\r\n\r\n### where\r\n\r\nYou can also scope your queries with where clauses.\r\n\r\n```php\r\n// Basic where clause\r\nSalesforce::table('MyTable')-\u003ewhere('Name', 'John Doe')-\u003eget();\r\n\r\n// You can also use any of the following operators\r\n\r\n// Equals and Not Equals\r\nSalesforce::table('MyTable')-\u003ewhere('Name', '=', 'John Doe')-\u003eget();\r\nSalesforce::table('MyTable')-\u003ewhere('Name', '!=', 'John Doe')-\u003eget();\r\n\r\n// Comparisons\r\nSalesforce::table('MyTable')-\u003ewhere('Age', '\u003c', 30)-\u003eget();\r\nSalesforce::table('MyTable')-\u003ewhere('Age', '\u003c=', 30)-\u003eget();\r\nSalesforce::table('MyTable')-\u003ewhere('Age', '\u003e', 30)-\u003eget();\r\nSalesforce::table('MyTable')-\u003ewhere('Age', '\u003e=', 30)-\u003eget();\r\n\r\n// Like\r\nSalesforce::table('MyTable')-\u003ewhere('Name', 'LIKE', 'John %')-\u003eget();\r\nSalesforce::table('MyTable')-\u003ewhere('Name', 'LIKE', '% Middlename %')-\u003eget();\r\nSalesforce::table('MyTable')-\u003ewhere('Name', 'LIKE', '% Doe')-\u003eget();\r\n```\r\n\r\n### whereIn\r\n\r\nYou can provide an array of possible values to the `whereIn` method to select any records that match any of the values.\r\n\r\n```php\r\nSalesforce::table('MyTable')-\u003ewhereIn('Country', ['United Kingdom', 'United States'])-\u003eget();\r\n```\r\n\r\n### orderBy\r\n\r\nYou can order by a particular field in either ascending or descending order.\r\n\r\n```php\r\n// Ascending (default)\r\nSalesforce::table('MyTable')-\u003eorderBy('Age')-\u003eget();\r\n\r\n// Descending\r\nSalesforce::table('MyTable')-\u003eorderBy('Age', 'DESC')-\u003eget();\r\n```\r\n\r\n### nullsLast\r\n\r\nBy default when chaining an orderBy null values are returned first.\r\nYou can chain on `-\u003enullsLast()` to return null values last.\r\n\r\n```php\r\nSalesforce::table('MyTable')-\u003eorderBy('LastLoginDate')-\u003enullsLast()-\u003eget();\r\n```\r\n\r\n### limit\r\n\r\nYou can limit the amount of records returned.\r\n\r\n```php\r\nSalesforce::table('MyTable')-\u003ewhere('Name', 'LIKE', 'John%')-\u003elimit(20)-\u003eget();\r\n```\r\n\r\n## Exceptions\r\n\r\nBy default [omniphx/forrest](https://github.com/omniphx/forrest) typically throws a single exception with more detail contained within a JSON encoded string.\r\nWe've wrapped some with our own exceptions to help with debugging.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsynergitech%2Flaravel-salesforce","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsynergitech%2Flaravel-salesforce","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsynergitech%2Flaravel-salesforce/lists"}