<commit_before><?php

namespace interactivesolutions\honeycombacl\http\middleware;

use Artisan;
use Closure;
use Illuminate\Support\Facades\Cache;

class HCACLAdminMenu
{
    /**
     * Handle an incoming request.
     *
     * @param  \Illuminate\Http\Request $request
     * @param  \Closure $next
     * @return mixed
     */
    public function handle ($request, Closure $next)
    {
        if (auth ()->check ()) {
            if ($request->segment (1) == 'admin') {
                if (!Cache::has ('hc-admin-menu'))
                    Artisan::call ('hc:menu');

                // get menu items from cache
                $menu = Cache::get ('hc-admin-menu');

                // format set menu items which have parent path to their parent as child
                $menu = $this->formatParentMenu ($menu);

                //filter and sort admin menu
                $menu = $this->filterAdminMenuHolder ($menu);

                // sort menu
                $menu = $this->sortByAsc ($menu);

                // add admin menu as global variable in blades
                view ()->share ('adminMenu', $menu);
            }
        }

        return $next($request);
    }<commit_msg>updated hc command call name<commit_after><?php

namespace interactivesolutions\honeycombacl\http\middleware;

use Artisan;
use Closure;
use Illuminate\Support\Facades\Cache;

class HCACLAdminMenu
{
    /**
     * Handle an incoming request.
     *
     * @param  \Illuminate\Http\Request $request
     * @param  \Closure $next
     * @return mixed
     */
    public function handle ($request, Closure $next)
    {
        if (auth ()->check ()) {
            if ($request->segment (1) == 'admin') {
                if (!Cache::has ('hc-admin-menu'))
                    Artisan::call ('hc:admin-menu');

                // get menu items from cache
                $menu = Cache::get ('hc-admin-menu');

                // format set menu items which have parent path to their parent as child
                $menu = $this->formatParentMenu ($menu);

                //filter and sort admin menu
                $menu = $this->filterAdminMenuHolder ($menu);

                // sort menu
                $menu = $this->sortByAsc ($menu);

                // add admin menu as global variable in blades
                view ()->share ('adminMenu', $menu);
            }
        }

        return $next($request);
    }
{'fraction_non_alphanumeric': 0.1237070748862226, 'fraction_numerical': 0.0008274720728175424, 'mean_word_length': 1.674778761061947, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2639061', 'n_tokens_mistral': 674, 'n_tokens_neox': 634, 'n_words': 188}