Commit c928b193 authored by Nicolas Widart's avatar Nicolas Widart

Posting at right route

parent a4241bec
<?php namespace Modules\Menu\Http\Controllers\Admin;
use Modules\Menu\Entities\Menu;
class MenuItemController
{
public function update()
public function create(Menu $menu)
{
return view('menu::admin.menuitems.create', compact('menu'));
}
public function store(Menu $menu)
{
dd('Form posted', $menu);
}
public function update(Menu $menu)
{
dd('ok?');
}
}
......@@ -12,7 +12,7 @@
@stop
@section('content')
{!! Form::open(['route' => ['dashboard.menu.store'], 'method' => 'post']) !!}
{!! Form::open(['route' => ['dashboard.menuitem.store', $menu->id], 'method' => 'post']) !!}
<div class="row">
<div class="col-md-12">
......
......@@ -19,7 +19,13 @@
{!! Form::open(['route' => ['dashboard.menu.update', $menu->id], 'method' => 'put']) !!}
<div class="row">
<div class="col-md-6">
<div class="row">
<div class="btn-group pull-right">
<a href="{{ URL::route('dashboard.menuitem.create', [$menu->id]) }}" class="btn btn-primary btn-flat">
<i class="fa fa-pencil"></i> {{ trans('menu::menu.button.create menu item') }}
</a>
</div>
</div>
</div>
<div class="col-md-6">
<div class="box box-info">
......
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