Commit 1a81c4b8 authored by Nicolas Widart's avatar Nicolas Widart

Create a menu

parent c1a53660
<?php namespace Modules\Menu\Http\Controllers\Admin;
use Illuminate\Support\Facades\Redirect;
use Illuminate\Support\Facades\View;
use Laracasts\Flash\Flash;
use Modules\Core\Http\Controllers\Admin\AdminBaseController;
use Modules\Menu\Http\Requests\CreateMenuRequest;
use Modules\Menu\Repositories\MenuRepository;
......@@ -17,6 +19,7 @@ class MenuController extends AdminBaseController
parent::__construct();
$this->menu = $menu;
}
public function index()
{
return View::make('menu::admin.menus.index');
......
<?php namespace Modules\Menu\Repositories\Eloquent;
use Modules\Core\Internationalisation\Helper;
use Modules\Core\Repositories\Eloquent\EloquentBaseRepository;
use Modules\Menu\Entities\Menu;
use Modules\Menu\Repositories\MenuRepository;
class EloquentMenuRepository extends EloquentBaseRepository implements MenuRepository
{
public function create($data)
{
$translatableData = Helper::separateLanguages($data);
dd($translatableData);
Menu::create($translatableData);
}
}
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