protected function updateMenu()
    {
        $menu = \Menu::get('ChronosMenu');

        // Content tab
        $content_menu = $menu->add(trans('chronos.content::menu.Content'), null)
            ->prepend('<span class="icon c4icon-pencil-3"></span>')
            ->data('order', 100)->data('permissions', ['view_content_types', 'view_media']);

        if (class_exists('Chronos\Content\Models\ContentType') && Schema::hasTable('content_types')) {
            $types = \Chronos\Content\Models\ContentType::orderBy('name')->get();
            if ($types) {
                foreach ($types as $k => $type) {
                    $content_menu->add($type->name, ['route' => ['chronos.content', 'type' => $type->id]])
                        ->data('order', 100 + $k * 5)->data('permissions', ['view_content_type_' . $type->id]);
                }
            }
        }
        $content_menu->add(trans('chronos.content::menu.Media'), ['route' => 'chronos.content.media'])
                ->data('order', 800)->data('permissions', ['view_media']);
        $content_menu->add(trans('chronos.content::menu.Content types'), ['route' => 'chronos.content.types'])
                ->data('order', 900)->data('permissions', ['view_content_types']);

        // Settings tab
        if (class_exists('Chronos\Scaffolding\Models\Setting') && \Schema::hasTable('settings') && settings('is_multilanguage')) {
            $settings_menu = $menu->get(camel_case(trans('chronos.scaffolding::menu.Settings')));
            $settings_permissions = $settings_menu->permissions;
            $settings_permissions[] = 'edit_languages';
            $settings_menu->data('permissions', $settings_permissions);
            $settings_menu->add(trans('chronos.content::menu.Languages'), ['route' => 'chronos.settings.languages'])
                ->data('order', 920)->data('permissions', ['edit_languages']);
        }
    }