Skip to content
This repository has been archived by the owner on May 18, 2020. It is now read-only.

Commit

Permalink
Use different Doctrine package + register namespace in driver chain
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickbrouwers committed Jul 5, 2015
1 parent 9726f97 commit 11e817b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

Include the service provider in `config/app.php`
```php
'Mitch\LaravelDoctrine\LaravelDoctrineServiceProvider',
'Brouwers\LaravelDoctrine\DoctrineServiceProvider',
'Maatwebsite\Usher\UsherServiceProvider'
```

Expand Down
8 changes: 1 addition & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,11 @@
"email": "[email protected]"
}
],
"repositories": [
{
"type": "vcs",
"url": "[email protected]:Maatwebsite/laravel-doctrine.git"
}
],
"require": {
"php": ">=5.4.0",
"nesbot/carbon": "~1.0",
"beberlei/assert": "~2.3",
"mitchellvanw/laravel-doctrine": "dev-develop"
"brouwers/laravel-doctrine": "~1.0.0"
},
"require-dev": {
"phpunit/phpunit": "~4.5",
Expand Down
7 changes: 6 additions & 1 deletion src/UsherServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ public function boot()
*/
public function register()
{
// Add namespace to driver chain
$this->app['events']->listen('doctrine.driver-chain::booted', function ($driver, $chain) {
$chain->addDriver($driver, 'Maatwebsite');
});

$this->bindUserEntity();
$this->bindRepositories();
$this->extendAuthManager();
Expand All @@ -39,7 +44,7 @@ public function register()
*/
protected function extendAuthManager()
{
// Set Usher as default auth drive
// Set Usher as default auth driver
$this->app['config']->set('auth.driver', 'usher');

// Extend the auth manager
Expand Down

0 comments on commit 11e817b

Please sign in to comment.