Skip to content

Commit b7ddd6c

Browse files
author
Michael Lundbøl
committed
Fix failing tests. And really forced bcrypt this time! :)
1 parent 7c51951 commit b7ddd6c

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

src/Illuminate/Foundation/helpers.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,7 @@ function base_path($path = '')
193193
*/
194194
function bcrypt($value, $options = [])
195195
{
196-
return app('hash')
197-
->driver('bcrypt')
196+
return app('hash.bcrypt')
198197
->make($value, $options);
199198
}
200199
}

src/Illuminate/Hashing/HashServiceProvider.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,16 @@ class HashServiceProvider extends ServiceProvider
2020
*/
2121
public function register()
2222
{
23+
$this->app->singleton('hash.manager', function ($app) {
24+
return (new HashManager($app));
25+
});
26+
2327
$this->app->singleton('hash', function ($app) {
24-
return (new HashManager($app))->driver();
28+
return $app['hash.manager']->driver();
29+
});
30+
31+
$this->app->singleton('hash.bcrypt', function($app) {
32+
return $app['hash.manager']->driver('bcrypt');
2533
});
2634
}
2735

@@ -32,6 +40,6 @@ public function register()
3240
*/
3341
public function provides()
3442
{
35-
return ['hash'];
43+
return ['hash', 'hash.manager', 'hash.bcrypt'];
3644
}
3745
}

0 commit comments

Comments
 (0)