app/Statistics/Repository/HitCountRepository.php
private function hitCountQuery($page_name, string $page_parameter = ''): string
    {
        if ($page_name === '') {
            // index.php?ctype=gedcom
            $page_name      = 'index.php';
            $page_parameter = 'gedcom:' . $this->tree->id();
        } elseif ($page_name === 'index.php') {
            // index.php?ctype=user
            $user           = $this->user_service->findByIdentifier($page_parameter);
            $page_parameter = 'user:' . ($user ? $user->id() : Auth::id());
        }

        $count = (int) DB::table('hit_counter')
            ->where('gedcom_id', '=', $this->tree->id())
            ->where('page_name', '=', $page_name)
            ->where('page_parameter', '=', $page_parameter)
            ->value('page_count');

        return view(
            'statistics/hit-count',
            [
                'count' => $count,
            ]
        );
    }
private function hitCountQuery($page_name, string $page_parameter = ''): string
    {
        if ($page_name === '') {
            // index.php?ctype=gedcom
            $page_name      = 'index.php';
            $page_parameter = 'gedcom:' . $this->tree->id();
        } elseif ($page_name === 'index.php') {
            // index.php?ctype=user
            $user           = $this->user_service->findByIdentifier($page_parameter);
            $page_parameter = 'user:' . ($user ? $user->id() : Auth::id());
        }

        $count = (int) DB::table('hit_counter')
            ->where('gedcom_id', '=', $this->tree->id())
            ->where('page_name', '=', $page_name)
            ->where('page_parameter', '=', $page_parameter)
            ->value('page_count');

        return view(
            'statistics/hit-count',
            [
                'count' => $count,
            ]
        );
    }
private function hitCountQuery ( $ page_name , string $ page_parameter = '' ) : string { if ( $ page_name === '' ) { // index.php?ctype=gedcom $ page_name = 'index.php' ; $ page_parameter = 'gedcom:' . $ this -> tree -> id ( ) ; } elseif ( $ page_name === 'index.php' ) { // index.php?ctype=user $ user = $ this -> user_service -> findByIdentifier ( $ page_parameter ) ; $ page_parameter = 'user:' . ( $ user ? $ user -> id ( ) : Auth :: id ( ) ) ; } $ count = ( int ) DB :: table ( 'hit_counter' ) -> where ( 'gedcom_id' , '=' , $ this -> tree -> id ( ) ) -> where ( 'page_name' , '=' , $ page_name ) -> where ( 'page_parameter' , '=' , $ page_parameter ) -> value ( 'page_count' ) ; return view ( 'statistics/hit-count' , [ 'count' => $ count , ] ) ; }
These functions provide access to hitcounter for use in the HTML block.

@param string $page_name
@param string $page_parameter

@return string
These functions provide access to hitcounter for use in the HTML block .