This commit is contained in:
Chris
2019-06-13 15:40:26 +01:00
parent d79202ed87
commit 1419882455
3 changed files with 35 additions and 2 deletions

View File

@@ -125,6 +125,7 @@ class ItemController extends Controller
{
//
$data['tags'] = Item::ofType('tag')->orderBy('title', 'asc')->pluck('title', 'id');
$data['tags']->prepend('Home dashboard', 0);
$data['current_tags'] = [];
return view('items.create', $data);
@@ -200,8 +201,10 @@ class ItemController extends Controller
// Get the item
$data['item'] = Item::find($id);
$data['tags'] = Item::ofType('tag')->orderBy('title', 'asc')->pluck('title', 'id');
$data['current_tags'] = $data['item']->parents;
$data['tags']->prepend('Home dashboard', 0);
$data['current_tags'] = $data['item']->tags();
//$data['current_tags'] = $data['item']->parent;
//die(print_r($data['current_tags']));
// show the edit form and pass the nerd
return view('items.edit', $data);
}