PHPackages                             supportkbz/laravel-salesforce - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. supportkbz/laravel-salesforce

ActiveLibrary

supportkbz/laravel-salesforce
=============================

Package CRUD connexion with Salesforce

1.0.4(today)07↑2471.4%MITPHPPHP ^8.3CI failing

Since Jul 27Pushed todayCompare

[ Source](https://github.com/SupportKBZ/laravel-salesforce)[ Packagist](https://packagist.org/packages/supportkbz/laravel-salesforce)[ Docs](https://github.com/kandbaz/laravel-salesforce)[ GitHub Sponsors](https://github.com/kandbaz)[ RSS](/packages/supportkbz-laravel-salesforce/feed)WikiDiscussions main Synced today

READMEChangelog (4)Dependencies (14)Versions (6)Used By (0)

Laravel Salesforce
==================

[](#laravel-salesforce)

 [![Packagist](https://camo.githubusercontent.com/ab344ac340b2a096708bef0ef67954deea1e6fa174fcf580f5c84ce57fa5bf04/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b616e6462617a2f6c61726176656c2d73616c6573666f7263652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kandbaz/laravel-salesforce) [![PHP from Packagist](https://camo.githubusercontent.com/e109b4cefd2bd1f2f67c100f2c2ffbec4a93db65b145c9ff8a0742fc5aa0fb5d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6b616e6462617a2f6c61726176656c2d73616c6573666f7263652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kandbaz/laravel-salesforce) [![Laravel versions](https://camo.githubusercontent.com/c4f32531f995f015a1fe6a447321a3d6107a590b8accaa2c41e616a7c16a8650/68747470733a2f2f62616467652e6c61726176656c2e636c6f75642f62616467652f6b616e6462617a2f6c61726176656c2d73616c6573666f7263653f7374796c653d666c6174)](https://packagist.org/packages/kandbaz/laravel-salesforce) [![GitHub Workflow Status (main)](https://camo.githubusercontent.com/4aad0181b7fdbcef25ee17e96779cd898c0ab16212be01cfd37790beac81d644/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6b616e6462617a2f6c61726176656c2d73616c6573666f7263652f74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d5465737473267374796c653d666c61742d737175617265)](https://github.com/kandbaz/laravel-salesforce/actions) [![Total Downloads](https://camo.githubusercontent.com/c884e61beaa8ec1776ddd89ac9b1426ede0b9f4ddb530d67500c1320a43c1583/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b616e6462617a2f6c61726176656c2d73616c6573666f7263652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kandbaz/laravel-salesforce)

Package CRUD pour interagir avec Salesforce via des classes sObject Eloquent-like.

Installation
------------

[](#installation)

```
composer require supportkbz/laravel-salesforce
```

Publie la configuration :

```
php artisan vendor:publish --tag="laravel-salesforce-config"
```

Renseigne les variables d'environnement :

```
SF_URL=https://your-instance.salesforce.com
SF_CONSUMER_KEY=
SF_CONSUMER_SECRET=
SF_USERNAME=
SF_PASSWORD=
SF_VERSION=v59.0
SF_OWNER_ID=

# Cache du token OAuth : `default` (Cache Laravel / CACHE_DRIVER) ou `file`
SF_CACHE_DRIVER=default
# SF_CACHE_PATH=   # mode file uniquement
# SF_CACHE_KEY=    # mode default uniquement
```

### Cache du token

[](#cache-du-token)

DriverComportement`default`Utilise `Cache::get/put/forget` avec le `CACHE_DRIVER` de l'app`file`Persiste un fichier chiffre via `file_put_contents` (+ Crypt)Usage
-----

[](#usage)

### Creer une classe sObject

[](#creer-une-classe-sobject)

```
php artisan make:sobject Lead
# ou avec un nom d'API custom :
php artisan make:sobject Address --table=Adresse__c
```

Exemple genere / manuel :

```
namespace App\Salesforce;

use SupportKBZ\SObject\SObject;

class Lead extends SObject
{
    protected string $table = 'Lead';

    protected array $fillable = [
        'Id',
        'Email',
        'FirstName',
        'LastName',
    ];

    protected array $map = [
        'Id' => 'id',
        'Email' => 'email',
        'FirstName' => 'first_name',
        'LastName' => 'last_name',
    ];
}
```

### Requetes

[](#requetes)

```
$lead = (new Lead)->find('00Q...');
$lead = (new Lead)->find('email', 'john@example.com');
$lead = (new Lead)->where('Status', 'Open')->first();

$leads = (new Lead)
    ->where(function ($q) {
        $q->where('Status', 'Open')->orWhere('Status', 'Pending');
    })
    ->whereIn('LeadSource', ['Web', 'Partner'])
    ->get();
```

### Ecriture

[](#ecriture)

```
$lead = new Lead;
$lead->email = 'john@example.com';
$lead->first_name = 'John';
$lead->last_name = 'Doe';
$lead->save();

$lead->status = 'Qualified';
$lead->save();

(new Lead)->insert(['Email' => 'jane@example.com', 'LastName' => 'Doe']);
(new Lead)->update('00Q...', ['Status' => 'Closed']);
```

Les cles acceptees par `insert` / `update` / les setters peuvent etre des noms Salesforce (`Email`) ou des noms mappes (`email`).

### Upload / download

[](#upload--download)

Le trait `UploadsAndDownloads` est inclus sur `SObject` :

```
(new Lead)->upload('/path/to/file.pdf', $linkedEntityId);
(new Lead)->download($contentVersionId, storage_path('app/sf_file'));
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Thank you for considering contributing to Laravel Salesforce! Please review our [contributing guide](.github/CONTRIBUTING.md) to get started.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](.github/SECURITY.md) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Kandbaz](https://github.com/kandbaz)
- [All Contributors](../../contributors)

License
-------

[](#license)

Laravel Salesforce is open-sourced software licensed under the [MIT license](LICENSE.md).

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance100

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

5

Last Release

0d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4657146ec42f1d8e944b03da349a10e5987d46e638de93dd359c0756b09deb0b?d=identicon)[SupportKBZ](/maintainers/SupportKBZ)

---

Top Contributors

[![SupportKBZ](https://avatars.githubusercontent.com/u/145564112?v=4)](https://github.com/SupportKBZ "SupportKBZ (9 commits)")

---

Tags

laravelsalesforcekandbazlaravel-salesforcesobject

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/supportkbz-laravel-salesforce/health.svg)

```
[![Health](https://phpackages.com/badges/supportkbz-laravel-salesforce/health.svg)](https://phpackages.com/packages/supportkbz-laravel-salesforce)
```

###  Alternatives

[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M134](/packages/roots-acorn)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k15.1M137](/packages/laravel-pulse)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

77922.3M186](/packages/laravel-mcp)[psalm/plugin-laravel

Psalm plugin for Laravel

3345.3M348](/packages/psalm-plugin-laravel)[propaganistas/laravel-disposable-email

Disposable email validator

6023.0M7](/packages/propaganistas-laravel-disposable-email)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M250](/packages/laravel-ai)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
