Skip to content

Commit

Permalink
Fixed autoloading aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
davispeixoto committed Apr 14, 2014
1 parent 4ba352e commit 27c2030
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Begin by installing this package through Composer. Edit your project's `composer

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

Next, update Composer from the Terminal:
Expand Down
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.3.0",
"illuminate/support": "4.1.*",
"davispeixoto/force-dot-com-toolkit-for-php": "1.0.2"
"davispeixoto/force-dot-com-toolkit-for-php": "1.0.3"
},
"autoload": {
"psr-0": {
Expand Down
2 changes: 1 addition & 1 deletion src/Davispeixoto/LaravelSalesforce/Facades/Salesforce.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ class Salesforce extends Facade {
* @return string
*/
protected static function getFacadeAccessor() {
return 'laravel-salesforce';
return 'salesforce';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class LaravelSalesforceServiceProvider extends ServiceProvider {
*
* @var bool
*/
protected $defer = true;
protected $defer = false;

/**
* Bootstrap the application events.
Expand All @@ -27,16 +27,16 @@ public function boot()
* @return void
*/
public function register()
{
$this->app['laravel-salesforce'] = $this->app->share(function($app) {
return new Salesforce($app['config']);
});

{
$this->app->booting(function() {
$loader = \Illuminate\Foundation\AliasLoader::getInstance();
$loader->alias('Salesforce', 'Davispeixoto\LaravelSalesforce\Facades\Salesforce');
$loader->alias('SF', 'Davispeixoto\LaravelSalesforce\Facades\Salesforce');
});

$this->app['salesforce'] = $this->app->share(function($app) {
return new Salesforce($app['config']);
});
}

/**
Expand All @@ -46,7 +46,7 @@ public function register()
*/
public function provides()
{
return array('laravel-salesforce');
return array('salesforce');
}

}
Expand Down

0 comments on commit 27c2030

Please sign in to comment.