Commit 132d6145 authored by Nicolas Widart's avatar Nicolas Widart

Adding menu item repository and implementation

parent 2ec13405
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
use Illuminate\Support\ServiceProvider; use Illuminate\Support\ServiceProvider;
use Modules\Menu\Entities\Menu; use Modules\Menu\Entities\Menu;
use Modules\Menu\Entities\Menuitem;
use Modules\Menu\Repositories\Eloquent\EloquentMenuItemRepository;
use Modules\Menu\Repositories\Eloquent\EloquentMenuRepository; use Modules\Menu\Repositories\Eloquent\EloquentMenuRepository;
class MenuServiceProvider extends ServiceProvider class MenuServiceProvider extends ServiceProvider
...@@ -47,6 +49,12 @@ class MenuServiceProvider extends ServiceProvider ...@@ -47,6 +49,12 @@ class MenuServiceProvider extends ServiceProvider
return new EloquentMenuRepository(new Menu); return new EloquentMenuRepository(new Menu);
} }
); );
$this->app->bind(
'Modules\Menu\Repositories\MenuItemRepository',
function() {
return new EloquentMenuItemRepository(new Menuitem);
}
);
} }
} }
<?php namespace Modules\Menu\Repositories\Eloquent;
use Modules\Core\Repositories\Eloquent\EloquentBaseRepository;
use Modules\Menu\Repositories\MenuRepository;
class EloquentMenuItemRepository extends EloquentBaseRepository implements MenuRepository
{
}
<?php namespace Modules\Menu\Repositories;
use Modules\Core\Repositories\BaseRepository;
interface MenuItemRepository extends BaseRepository
{
}
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