File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff 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}
Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments