Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Platform
Commits
1a81c4b8
Commit
1a81c4b8
authored
Nov 08, 2014
by
Nicolas Widart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create a menu
parent
c1a53660
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
MenuController.php
Http/Controllers/Admin/MenuController.php
+3
-0
EloquentMenuRepository.php
Repositories/Eloquent/EloquentMenuRepository.php
+8
-0
No files found.
Http/Controllers/Admin/MenuController.php
View file @
1a81c4b8
<?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'
);
...
...
Repositories/Eloquent/EloquentMenuRepository.php
View file @
1a81c4b8
<?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
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment