Skip to content

Commit 10ee998

Browse files
authored
Merge pull request #1162 from dees040/master
Added missing dependency
2 parents 39f6516 + 1183255 commit 10ee998

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

src/Jenssegers/Mongodb/Auth/PasswordBrokerManager.php

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,23 @@ class PasswordBrokerManager extends BasePasswordBrokerManager
99
*/
1010
protected function createTokenRepository(array $config)
1111
{
12-
return new DatabaseTokenRepository(
13-
$this->app['db']->connection(),
14-
$config['table'],
15-
$this->app['config']['app.key'],
16-
$config['expire']
17-
);
12+
$laravel = app();
13+
14+
if (starts_with($laravel::VERSION, '5.4')) {
15+
return new DatabaseTokenRepository(
16+
$this->app['db']->connection(),
17+
$this->app['hash'],
18+
$config['table'],
19+
$this->app['config']['app.key'],
20+
$config['expire']
21+
);
22+
} else {
23+
return new DatabaseTokenRepository(
24+
$this->app['db']->connection(),
25+
$config['table'],
26+
$this->app['config']['app.key'],
27+
$config['expire']
28+
);
29+
}
1830
}
1931
}

0 commit comments

Comments
 (0)