src/Gzero/Cms/Listeners/BlockLoad.php
public function handleRoute(GzeroRouteMatched $event)
    {
        $blockIds = $this->blockFinder->getBlocksIds($event->route->getRoutable(), true);
        $blocks   = $this->blockRepository->getVisibleBlocks($blockIds, $this->languageService->getCurrent(), true);
        $this->handleBlockRendering($blocks);
        $blocks = $blocks->groupBy('region');
        view()->share('blocks', $blocks);
    }
public function handleRoute(GzeroRouteMatched $event)
    {
        $blockIds = $this->blockFinder->getBlocksIds($event->route->getRoutable(), true);
        $blocks   = $this->blockRepository->getVisibleBlocks($blockIds, $this->languageService->getCurrent(), true);
        $this->handleBlockRendering($blocks);
        $blocks = $blocks->groupBy('region');
        view()->share('blocks', $blocks);
    }
public function handleRoute ( GzeroRouteMatched $ event ) { $ blockIds = $ this -> blockFinder -> getBlocksIds ( $ event -> route -> getRoutable ( ) , true ) ; $ blocks = $ this -> blockRepository -> getVisibleBlocks ( $ blockIds , $ this -> languageService -> getCurrent ( ) , true ) ; $ this -> handleBlockRendering ( $ blocks ) ; $ blocks = $ blocks -> groupBy ( 'region' ) ; view ( ) -> share ( 'blocks' , $ blocks ) ; }
Handle the event. It loads block for dynamic router.

@param GzeroRouteMatched $event dispatched event

@return void
Handle the event . It loads block for dynamic router .