Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #117

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ You can find the config file in: `config/eloquent_sf.php`. Any of the same setti
Create a model for the object you want to use, example:

```bash
artisan make:model Lead
php artisan make:model Lead
```

Open the model file, it will look like this:
Expand Down Expand Up @@ -113,7 +113,7 @@ class Lead extends Model
You can also use the new artisan command:

```bash
artisan make:salesforce Lead
php artisan make:salesforce Lead
```

This will generate the model as you see above without any changes necessary
Expand Down Expand Up @@ -374,7 +374,7 @@ $statusValues = $lead->getPicklistValues('Status');
$statusValue = SObjects::getPicklistValues('Lead', 'Status');
```

## Local Sync (NEW!)
## Local Sync

A new trait has been created to make it simple to keep a local DB model in sync with a salesforce object.

Expand All @@ -383,7 +383,7 @@ Use this if you want to keep a local table, or just some fields, in sync with an
```php
<?php

namespace Lester\EloquentSalesForce;
namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Lester\EloquentSalesForce\Traits\SyncsWithSalesforce;
Expand Down Expand Up @@ -446,6 +446,7 @@ If you need to perform more complex data manipulation when syncing, just use mut
$this->attributes['name'] = implode(' ', $nameParts);
}
```
In your `src/Console/SyncFromSalesforce.php` file you will also see an illustration for using SyncFromSalesforce to synchronize all objects in all models specified for 2way synchronization in your `config/eloquent_sf.php` file in the array 'syncTwoWayModels'.

## Custom Objects

Expand Down