Commit dcccc458 authored by Nicolas Widart's avatar Nicolas Widart

Adding a create menu item form request

parent 207d0038
<?php namespace Modules\Menu\Http\Controllers\Admin;
use Modules\Menu\Entities\Menu;
use Modules\Menu\Http\Requests\CreateMenuItemRequest;
class MenuItemController
{
......@@ -9,9 +10,9 @@ class MenuItemController
return view('menu::admin.menuitems.create', compact('menu'));
}
public function store(Menu $menu)
public function store(Menu $menu, CreateMenuItemRequest $request)
{
dd('Form posted', $menu);
dd('Form posted', $menu, $request->all());
}
public function update(Menu $menu)
......
<?php namespace Modules\Menu\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class CreateMenuItemRequest extends FormRequest
{
public function rules()
{
return [];
}
public function authorize()
{
return true;
}
public function messages()
{
return [];
}
}
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