public static function setHomepage()
    {
        if(!self::$homepage) {
            $findHomePage = null;
            if (settings('homepageID')) {
                $findHomePage = (new Post())->setTable("post_pages")
                    ->where('postID', settings('homepageID'))
                    ->first();
            }

            // get the first found page if no homepage is defined
            if (!$findHomePage) {
                $findHomePage = (new Post())->setTable("post_pages")->first();
            }

            if(!$findHomePage) {
                throw new \Exception("No homepage found. Please add a page post!");
            }
            self::$homepage = $findHomePage;

        }

        return self::$homepage;
    }