File tree Expand file tree Collapse file tree 1 file changed +18
-6
lines changed
src/Jenssegers/Mongodb/Auth Expand file tree Collapse file tree 1 file changed +18
-6
lines changed Original file line number Diff line number Diff line change @@ -9,11 +9,23 @@ class PasswordBrokerManager extends BasePasswordBrokerManager
9
9
*/
10
10
protected function createTokenRepository (array $ config )
11
11
{
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
+ }
18
30
}
19
31
}
You can’t perform that action at this time.
0 commit comments