/**
  * @param FrontPageFound $event
  */
 public function handle(FrontPageFound $event)
 {
     $page = $event->getPage();
     $layoutBlocks = (new LayoutBlock())->getBlocksGroupedByLayouts($page->getLayout());
     foreach ($layoutBlocks as $name => $blocks) {
         foreach ($blocks as $block) {
             if (!($part = PagePart::exists($page, $block))) {
                 continue;
             }
             $partWidget = new PagePartWidget(app('widget.manager'), $part['name']);
             $partWidget->setContent($part['content_html']);
             Block::addWidget($partWidget, $block);
         }
     }
 }
 /**
  * @param FrontPageFound $event
  */
 public function handle(FrontPageFound $event)
 {
     app('assets.meta')->setMetaData($event->getPage());
 }
 /**
  * @param FrontPageFound $event
  */
 public function handle(FrontPageFound $event)
 {
     app()->singleton('frontpage', function () use($event) {
         return $event->getPage();
     });
 }