diff --git a/README.md b/README.md index 15958d2..b8f94d1 100644 --- a/README.md +++ b/README.md @@ -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: @@ -21,8 +21,14 @@ 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' @@ -30,18 +36,22 @@ Finally add the service provider. Open `app/config/app.php`, and add a new item 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/) diff --git a/composer.json b/composer.json index 0af8754..763d634 100644 --- a/composer.json +++ b/composer.json @@ -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": { diff --git a/src/config/config.php b/src/config/config.php index e55d92e..b1153c7 100644 --- a/src/config/config.php +++ b/src/config/config.php @@ -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', ); \ No newline at end of file diff --git a/src/config/local/config.php b/src/config/local/config.php new file mode 100644 index 0000000..2e8c24e --- /dev/null +++ b/src/config/local/config.php @@ -0,0 +1,17 @@ + '', + 'password' => '', + 'token' => '', + 'wsdl' => app_path() . '/wsdl/enterprise.sandbox.wsdl.xml', +); \ No newline at end of file