protected function categoriesMenu() : array
    {
        if (! $this->app->bound($repository = 'category.repository.cahe')) {
            return [];
        }

        return $this->app->make($repository)->categoriesWithProducts()->mapWithKeys(function ($item) {
            return [$item->id => $item];
        })->all();
    }
protected function categoriesMenu() : array
    {
        if (! $this->app->bound($repository = 'category.repository.cahe')) {
            return [];
        }

        return $this->app->make($repository)->categoriesWithProducts()->mapWithKeys(function ($item) {
            return [$item->id => $item];
        })->all();
    }
protected function categoriesMenu ( ) : array { if ( ! $ this -> app -> bound ( $ repository = 'category.repository.cahe' ) ) { return [ ] ; } return $ this -> app -> make ( $ repository ) -> categoriesWithProducts ( ) -> mapWithKeys ( function ( $ item ) { return [ $ item -> id => $ item ] ; } ) -> all ( ) ; }
Returns the categories menu.

@return array
Returns the categories menu .