public static function getPopularPages()
    {
        // exclude pages
        $ids = Page::where('slug', '/')
            ->orWhere('url', '=', '')
            ->orWhere('url', 'LIKE', '/auth%')
            ->orWhere('url', 'LIKE', '/account%')
            ->get()
            ->pluck('id', 'id')
            ->values()
            ->toArray();

        // get the popular pages
        $items = Page::where('is_hidden', 0)
            ->whereNotIn('id', $ids)
            ->orderBy('views', 'DESC')
            ->get()
            ->take(5);

        return $items;

        return $items;
    }
public static function getPopularPages()
    {
        // exclude pages
        $ids = Page::where('slug', '/')
            ->orWhere('url', '=', '')
            ->orWhere('url', 'LIKE', '/auth%')
            ->orWhere('url', 'LIKE', '/account%')
            ->get()
            ->pluck('id', 'id')
            ->values()
            ->toArray();

        // get the popular pages
        $items = Page::where('is_hidden', 0)
            ->whereNotIn('id', $ids)
            ->orderBy('views', 'DESC')
            ->get()
            ->take(5);

        return $items;

        return $items;
    }
public static function getPopularPages ( ) { // exclude pages $ ids = Page :: where ( 'slug' , '/' ) -> orWhere ( 'url' , '=' , '' ) -> orWhere ( 'url' , 'LIKE' , '/auth%' ) -> orWhere ( 'url' , 'LIKE' , '/account%' ) -> get ( ) -> pluck ( 'id' , 'id' ) -> values ( ) -> toArray ( ) ; // get the popular pages $ items = Page :: where ( 'is_hidden' , 0 ) -> whereNotIn ( 'id' , $ ids ) -> orderBy ( 'views' , 'DESC' ) -> get ( ) -> take ( 5 ) ; return $ items ; return $ items ; }
Get the popular pages
@return static
Get the popular pages