{"action":"created","issue":{"url":"https://api.github.com/repos/jeroennoten/Laravel-AdminLTE/issues/149","repository_url":"https://api.github.com/repos/jeroennoten/Laravel-AdminLTE","labels_url":"https://api.github.com/repos/jeroennoten/Laravel-AdminLTE/issues/149/labels{/name}","comments_url":"https://api.github.com/repos/jeroennoten/Laravel-AdminLTE/issues/149/comments","events_url":"https://api.github.com/repos/jeroennoten/Laravel-AdminLTE/issues/149/events","html_url":"https://github.com/jeroennoten/Laravel-AdminLTE/issues/149","id":269324461,"number":149,"title":"HELP : how to foreach loop items into submenu ","user":{"login":"johnef","id":3006222,"avatar_url":"https://avatars3.githubusercontent.com/u/3006222?v=4","gravatar_id":"","url":"https://api.github.com/users/johnef","html_url":"https://github.com/johnef","followers_url":"https://api.github.com/users/johnef/followers","following_url":"https://api.github.com/users/johnef/following{/other_user}","gists_url":"https://api.github.com/users/johnef/gists{/gist_id}","starred_url":"https://api.github.com/users/johnef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnef/subscriptions","organizations_url":"https://api.github.com/users/johnef/orgs","repos_url":"https://api.github.com/users/johnef/repos","events_url":"https://api.github.com/users/johnef/events{/privacy}","received_events_url":"https://api.github.com/users/johnef/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-10-28T15:06:01Z","updated_at":"2017-10-28T20:13:32Z","closed_at":null,"author_association":"NONE","body":"Hi @jeroennoten  and @apisznasdin I need help on this please\r\nI am using configuration at runtime menu\r\n\r\nand I have submenu into it\r\n\r\nsomething like this\r\n\r\n```\r\n$event->menu->add( 'MEDIA' );\r\n\t$event->menu->add(\r\n\t\t[\r\n\t\t\t'text'       => 'About us',\r\n\t\t\t'icon_color' => 'green',\r\n\t\t\t'submenu'    => [\r\n\t\t\t\t[ ],\r\n\t\t\t],\r\n\t\t] ); \r\n```\r\n\r\nnow I need to do `foreach` loop inside the `submenu`\r\nhow this can be done\r\n\r\nthanks a loot\r\n"},"comment":{"url":"https://api.github.com/repos/jeroennoten/Laravel-AdminLTE/issues/comments/340216864","html_url":"https://github.com/jeroennoten/Laravel-AdminLTE/issues/149#issuecomment-340216864","issue_url":"https://api.github.com/repos/jeroennoten/Laravel-AdminLTE/issues/149","id":340216864,"user":{"login":"johnef","id":3006222,"avatar_url":"https://avatars3.githubusercontent.com/u/3006222?v=4","gravatar_id":"","url":"https://api.github.com/users/johnef","html_url":"https://github.com/johnef","followers_url":"https://api.github.com/users/johnef/followers","following_url":"https://api.github.com/users/johnef/following{/other_user}","gists_url":"https://api.github.com/users/johnef/gists{/gist_id}","starred_url":"https://api.github.com/users/johnef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnef/subscriptions","organizations_url":"https://api.github.com/users/johnef/orgs","repos_url":"https://api.github.com/users/johnef/repos","events_url":"https://api.github.com/users/johnef/events{/privacy}","received_events_url":"https://api.github.com/users/johnef/received_events","type":"User","site_admin":false},"created_at":"2017-10-28T20:13:32Z","updated_at":"2017-10-28T20:13:32Z","author_association":"NONE","body":"Hi I try to do something like this \r\n\r\n```\r\n//Portal Section\r\n\t\t\t$event->menu->add( 'MEDIA' );\r\n\t\t\t$event->menu->add(\r\n\t\t\t\t[\r\n\t\t\t\t\t'text'       => 'About us',\r\n\t\t\t\t\t'icon_color' => 'green',\r\n\t\t\t\t\t'submenu'    => [\r\n\t\t\t\t\t\t$submenu = [],\r\n\t\t\t\t\t],\r\n\t\t\t\t] );\r\n\r\n\t\t\t//dd( $event );\r\n\t\t\t$abouts = About::all();\r\n\t\t\tforeach ( $abouts as $about ) {\r\n\t\t\t\t$event->menu->add(\r\n\t\t\t\t\t$submenu = [\r\n\t\t\t\t\t\t'text'       => $about->title,\r\n\t\t\t\t\t\t'icon_color' => \"lime\",\r\n\t\t\t\t\t\t'url'        => 'admin/about/1/edit',\r\n\t\t\t\t\t] );\r\n\t\t\t} \r\n```\r\n\r\nbut got an error\r\n\r\n> Undefined index: text (View: .....\\resources\\views\\vendor\\adminlte\\partials\\menu-item.blade.php"}}
{"actor":{"display_login":"johnef"}}