app/Http/Controllers/HomePageController.php
public function treePageBlock(ServerRequestInterface $request, Tree $tree): ResponseInterface
    {
        $block_id = $request->get('block_id');

        $block_id = (int) DB::table('block')
            ->where('block_id', '=', $block_id)
            ->where('gedcom_id', '=', $tree->id())
            ->value('block_id');

        $module = $this->getBlockModule($tree, $block_id);

        $html = view('layouts/ajax', [
            'content' => $module->getBlock($tree, $block_id, 'gedcom'),
        ]);

        return response($html);
    }
public function treePageBlock(ServerRequestInterface $request, Tree $tree): ResponseInterface
    {
        $block_id = $request->get('block_id');

        $block_id = (int) DB::table('block')
            ->where('block_id', '=', $block_id)
            ->where('gedcom_id', '=', $tree->id())
            ->value('block_id');

        $module = $this->getBlockModule($tree, $block_id);

        $html = view('layouts/ajax', [
            'content' => $module->getBlock($tree, $block_id, 'gedcom'),
        ]);

        return response($html);
    }
public function treePageBlock ( ServerRequestInterface $ request , Tree $ tree ) : ResponseInterface { $ block_id = $ request -> get ( 'block_id' ) ; $ block_id = ( int ) DB :: table ( 'block' ) -> where ( 'block_id' , '=' , $ block_id ) -> where ( 'gedcom_id' , '=' , $ tree -> id ( ) ) -> value ( 'block_id' ) ; $ module = $ this -> getBlockModule ( $ tree , $ block_id ) ; $ html = view ( 'layouts/ajax' , [ 'content' => $ module -> getBlock ( $ tree , $ block_id , 'gedcom' ) , ] ) ; return response ( $ html ) ; }
Load block asynchronously.

@param ServerRequestInterface $request
@param Tree                   $tree

@return ResponseInterface
Load block asynchronously .