Skip to content

Commit

Permalink
Merge pull request #179 from yajra/custom-guard
Browse files Browse the repository at this point in the history
Add support for custom guard.
  • Loading branch information
lukepolo authored Mar 7, 2017
2 parents 03760ab + e44b015 commit 54cceef
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/LaraCart.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function __construct(SessionManager $session, Dispatcher $events, AuthMan
{
$this->session = $session;
$this->events = $events;
$this->authManager = $authManager;
$this->authManager = $authManager->guard(config('laracart.guard', null));
$this->prefix = config('laracart.cache_prefix', 'laracart');
$this->itemModel = config('laracart.item_model', null);
$this->itemModelRelations = config('laracart.item_model_relations', []);
Expand Down
8 changes: 8 additions & 0 deletions src/config/laracart.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,12 @@
|
*/
'cross_devices' => false,

/*
|--------------------------------------------------------------------------
| This allows you to use custom guard to get logged in user
|--------------------------------------------------------------------------
|
*/
'guard' => null,
];

0 comments on commit 54cceef

Please sign in to comment.