Using ::class notation

parent 1a865b35
......@@ -68,9 +68,7 @@ class MenuServiceProvider extends ServiceProvider
*/
private function registerBindings()
{
$this->app->bind(
'Modules\Menu\Repositories\MenuRepository',
function () {
$this->app->bind(MenuRepository::class, function () {
$repository = new EloquentMenuRepository(new Menu());
if (! config('app.cache')) {
......@@ -78,12 +76,9 @@ class MenuServiceProvider extends ServiceProvider
}
return new CacheMenuDecorator($repository);
}
);
});
$this->app->bind(
'Modules\Menu\Repositories\MenuItemRepository',
function () {
$this->app->bind(MenuItemRepository::class, function () {
$repository = new EloquentMenuItemRepository(new Menuitem());
if (! config('app.cache')) {
......@@ -91,8 +86,7 @@ class MenuServiceProvider extends ServiceProvider
}
return new CacheMenuItemDecorator($repository);
}
);
});
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment