Skip to content

Commit 2b470e5

Browse files
committed
Alias declaration more Laravel-like
1 parent 4ae90e5 commit 2b470e5

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/ServiceProvider.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,7 @@ private function bootServices($service): void
9898
$this->app->instance(Model::class, $model);
9999

100100
// register alias
101-
$this->app->bind('lodata.model', function ($app) {
102-
return $app->make(Model::class);
103-
});
101+
$this->app->alias(Model::class, 'lodata.model');
104102

105103
$this->app->bind(Response::class, function () {
106104
return Kernel::VERSION_ID < 60000 ? new Symfony\Response5() : new Symfony\Response6();

0 commit comments

Comments
 (0)