Skip to content

Commit

Permalink
Updated documentation. PHP 5.4 / Laravel 4.2 ready
Browse files Browse the repository at this point in the history
  • Loading branch information
davispeixoto committed Oct 20, 2014
1 parent 7d9951d commit cf1ce1d
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 20 deletions.
34 changes: 22 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
Laravel 4 Salesforce
====================

This Laravel 4 package provides an interface for using [Salesforce CRM](http://www.salesforce.com/) API.
This Laravel 4 package provides an interface for using [Salesforce CRM](http://www.salesforce.com/) through its SOAP API.

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

Begin by installing this package through Composer. Edit your project's `composer.json` file to require `davispeixoto/laravel-salesforce`.

"require": {
"laravel/framework": "4.1.*",
"davispeixoto/laravel-salesforce": "1.0.11"
}
"require": {
"laravel/framework": "4.*",
"davispeixoto/laravel-salesforce": "1.0.*"
}

Next, update Composer from the Terminal:

Expand All @@ -21,27 +21,37 @@ Once this operation completes, still in Terminal run:

php artisan config:publish davispeixoto/laravel-salesforce

### Configuration

Update the settings in the generated `app/config/packages/davispeixoto/laravel-salesforce` configuration file with your salesforce credentials.

Ensure you put [your WSDL file](https://www.salesforce.com/us/developer/docs/api/Content/sforce_api_quickstart_steps_generate_wsdl.htm) into a proper place and make it readable by your Laravel Application.

**IMPORTANT:** the PHP Force.com Toolkit for PHP only works with Enterprise WSDL

Finally add the service provider. Open `app/config/app.php`, and add a new item to the providers array.

'Davispeixoto\LaravelSalesforce\LaravelSalesforceServiceProvider'

That's it! You're all set to go. Just use:

Route::get('/test', function() {
try {
echo print_r(Salesforce::describeLayout('Account'));
} catch (Exception $e) {
Log::error($e->getMessage());
die($e->getMessage() . $e->getTraceAsString());
}
try {
echo print_r(Salesforce::describeLayout('Account'));
} catch (Exception $e) {
Log::error($e->getMessage());
die($e->getMessage() . $e->getTraceAsString());
}
});

### More Information

Check out the [SOAP API Salesforce Documentation](http://www.salesforce.com/us/developer/docs/api/index_Left.htm)

### License

This Salesforce Force.com Toolkit for PHP port is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)

### Versioning

This projetct follows the [Semantic Versioning](http://semver.org/)
This project follows the [Semantic Versioning](http://semver.org/)
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"require": {
"php": ">=5.4.0",
"illuminate/support": "4.*",
"davispeixoto/force-dot-com-toolkit-for-php": "1.0.3"
"davispeixoto/force-dot-com-toolkit-for-php": "1.0.*"
},
"autoload": {
"psr-0": {
Expand Down
7 changes: 0 additions & 7 deletions src/config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,4 @@
'password' => '',
'token' => '',
'wsdl' => app_path() . '/wsdl/enterprise.wsdl.xml',


// sandbox
// 'username' => '',
// 'password' => '',
// 'token' => '',
// 'wsdl' => app_path() . '/wsdl/enterprise.sandbox.wsdl.xml',
);
17 changes: 17 additions & 0 deletions src/config/local/config.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php
return array(

/*
|--------------------------------------------------------------------------
| Your Salesforce credentials
|--------------------------------------------------------------------------
|
|
*/

// sandbox
'username' => '',
'password' => '',
'token' => '',
'wsdl' => app_path() . '/wsdl/enterprise.sandbox.wsdl.xml',
);

0 comments on commit cf1ce1d

Please sign in to comment.