Skip to content

Commit 421a6e7

Browse files
committed
service alias 등록 방식 변경
1 parent c2e8cd0 commit 421a6e7

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

plugin.php

+5-7
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,11 @@ class Plugin extends AbstractPlugin
2121

2222
public function register()
2323
{
24-
app()->singleton(
25-
['freezer::handler' => Handler::class],
26-
function ($app) {
27-
$proxyClass = app('xe.interception')->proxy(Handler::class, 'Freezer');
28-
return new $proxyClass($this, app('xe.user'));
29-
}
30-
);
24+
app()->singleton(Handler::class, function ($app) {
25+
$proxyClass = app('xe.interception')->proxy(Handler::class, 'Freezer');
26+
return new $proxyClass($this, app('xe.user'));
27+
});
28+
app()->alias(Handler::class, 'freezer::handler');
3129

3230
// register commands
3331
app()->singleton(

0 commit comments

Comments
 (0)