Skip to content

Commit c272b15

Browse files
author
Michael Lundbøl
committed
Second try on manager.
1 parent b7ddd6c commit c272b15

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

src/Illuminate/Foundation/helpers.php

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

src/Illuminate/Hashing/HashServiceProvider.php

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,8 @@ 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-
2723
$this->app->singleton('hash', function ($app) {
28-
return $app['hash.manager']->driver();
29-
});
30-
31-
$this->app->singleton('hash.bcrypt', function($app) {
32-
return $app['hash.manager']->driver('bcrypt');
24+
return new HashManager($app);
3325
});
3426
}
3527

@@ -40,6 +32,6 @@ public function register()
4032
*/
4133
public function provides()
4234
{
43-
return ['hash', 'hash.manager', 'hash.bcrypt'];
35+
return ['hash'];
4436
}
4537
}

0 commit comments

Comments
 (0)