Error
Call to undefined method App\Models\PostTypes\Company::get() Error thrown with message "Call to undefined method App\Models\PostTypes\Company::get()" Stacktrace: #15 Error in /nas/content/live/tribecavp/wp-content/themes/tribecavp/app/Controllers/Single.php:35 #14 App\Controllers\Single:get in /nas/content/live/tribecavp/wp-content/themes/tribecavp/app/Controllers/Single.php:65 #13 App\Controllers\Single:data in /nas/content/live/tribecavp/wp-content/themes/tribecavp/vendor/soberwp/controller/src/Controller.php:211 #12 Sober\Controller\Controller:__setDataFromMethods in /nas/content/live/tribecavp/wp-content/themes/tribecavp/vendor/soberwp/controller/src/Controller.php:94 #11 Sober\Controller\Controller:__setData in /nas/content/live/tribecavp/wp-content/themes/tribecavp/vendor/soberwp/controller/controller.php:69 #10 Sober\Controller\{closure} in /nas/content/live/tribecavp/wp-includes/class-wp-hook.php:324 #9 WP_Hook:apply_filters in /nas/content/live/tribecavp/wp-includes/plugin.php:205 #8 apply_filters in /nas/content/live/tribecavp/wp-content/themes/tribecavp/app/filters.php:60 #7 App\{closure} in [internal]:0 #6 array_reduce in /nas/content/live/tribecavp/wp-content/themes/tribecavp/vendor/illuminate/support/Collection.php:1313 #5 Illuminate\Support\Collection:reduce in /nas/content/live/tribecavp/wp-content/themes/tribecavp/app/filters.php:61 #4 App\{closure} in /nas/content/live/tribecavp/wp-includes/class-wp-hook.php:324 #3 WP_Hook:apply_filters in /nas/content/live/tribecavp/wp-includes/plugin.php:205 #2 apply_filters in /nas/content/live/tribecavp/wp-includes/template-loader.php:104 #1 require_once in /nas/content/live/tribecavp/wp-blog-header.php:19 #0 require in /nas/content/live/tribecavp/index.php:17
Stack frames (16)
15
Error
/app/Controllers/Single.php35
14
App\Controllers\Single get
/app/Controllers/Single.php65
13
App\Controllers\Single data
/vendor/soberwp/controller/src/Controller.php211
12
Sober\Controller\Controller __setDataFromMethods
/vendor/soberwp/controller/src/Controller.php94
11
Sober\Controller\Controller __setData
/vendor/soberwp/controller/controller.php69
10
Sober\Controller\{closure}
/nas/content/live/tribecavp/wp-includes/class-wp-hook.php324
9
WP_Hook apply_filters
/nas/content/live/tribecavp/wp-includes/plugin.php205
8
apply_filters
/app/filters.php60
7
App\{closure}
[internal]0
6
array_reduce
/vendor/illuminate/support/Collection.php1313
5
Illuminate\Support\Collection reduce
/app/filters.php61
4
App\{closure}
/nas/content/live/tribecavp/wp-includes/class-wp-hook.php324
3
WP_Hook apply_filters
/nas/content/live/tribecavp/wp-includes/plugin.php205
2
apply_filters
/nas/content/live/tribecavp/wp-includes/template-loader.php104
1
require_once
/nas/content/live/tribecavp/wp-blog-header.php19
0
require
/nas/content/live/tribecavp/index.php17
/nas/content/live/tribecavp/wp-content/themes/tribecavp/app/Controllers/Single.php
   * @return stdClass | bool
   **/
  static private function get()
  {
    $this_post_type = get_post_type_object(get_post_type());
    if(!$this_post_type) return false;
    $post_class = Str::camel($this_post_type->labels->singular_name);
    /**
     * Fix for "news" / "Article" naming convention
     */
    if($post_class == 'article') {
      $post_class = 'news';
    }
 
    $model = '\App\Models\\PostTypes\\' . ucfirst($post_class);
    if(class_exists($model)) {
      if($post_class == 'news') {
        $post_class = 'newsArticle';
      }
      return $model::get()->{$post_class};
    } else {
      return false;
    }
  }
 
  /**
   * Back link.
   *
   * @return stdClass
   **/
  public function backLink()
  {
    return (object)[
      'url' => get_post_type_archive_link(get_post_type()),
      'anchor' => 'Back to ' . get_post_type_object(get_post_type())->label
    ];
  }
 
  /**
   * Expose $data variable for view files.
/nas/content/live/tribecavp/wp-content/themes/tribecavp/app/Controllers/Single.php
  public function backLink()
  {
    return (object)[
      'url' => get_post_type_archive_link(get_post_type()),
      'anchor' => 'Back to ' . get_post_type_object(get_post_type())->label
    ];
  }
 
  /**
   * Expose $data variable for view files.
   *
   * Undocumented function long description
   *
   * @param Type $var Description
   * @return type
   * @throws conditon
   **/
  public function data()
  {
    return self::get();
  }
}
/nas/content/live/tribecavp/wp-content/themes/tribecavp/vendor/soberwp/controller/src/Controller.php
        });
 
        // Get all public static methods from class
        $this->staticMethods = $this->class->getMethods(\ReflectionMethod::IS_STATIC);
 
        // Remove $this->staticMethods from $this->methods using array_diff
        $this->dataMethods = array_diff($this->methods, $this->staticMethods);
 
        // Filter the remaining data methods
        $this->dataMethods = array_filter($this->dataMethods, function ($method) {
            return $method = $method->name;
        });
 
        // For each method convert method name to snake case and add to data[key => value]
        foreach ($this->dataMethods as $method) {
            // Convert method name to snake case
            $var = Utils::convertToSnakeCase($method->name);
 
            // Add var method name to data[]
            $this->data[$var] = $this->{$method->name}();
        }
    }
 
    /**
     * Set Blade Data
     *
     * Update $this->data with __blade
     */
    final private function __setBladeData()
    {
        // Get the data
        $debuggerData = $this->data;
 
        // Loop through each data method
        foreach ($this->dataMethods as $dataMethod) {
            // Convert the key to snake case to find in $debuggerData
            $key = Utils::convertToSnakeCase($dataMethod->name);
 
            // Save the returned value from the above key
            $returned = $debuggerData[$key];
/nas/content/live/tribecavp/wp-content/themes/tribecavp/vendor/soberwp/controller/src/Controller.php
     * Set Controller Data
     *
     * Set the Controller raw data for this Controller
     * @return $this
     */
    final public function __setData($incomingData)
    {
        $this->incomingData = $incomingData;
        
        // Set the data from the WordPress post if singular to $this->data
        $this->__setDataFromPost();
 
        // Set the data from Advanced Custom Fields to $this->data
        $this->__setDataFromModuleAcf();
 
        // Set incoming filter data from Sage to App before Debugger
        $this->__setDataFromFilter();
 
        // Set the public methods from the class to $this->methods
        $this->__setDataFromMethods();
 
        // Set debugger data first to use only the raw data from the Controller
        $this->__setBladeData();
 
        // Set app data to $this->data['__app'] or merge with current data
        $this->__setAppData();
 
        // Set tree data to $this->data['__tree'] or merge with current data
        $this->__setTreeData();
    }
 
    /**
     * Set Data From Post
     *
     * Set the WordPress post
     */
    final private function __setDataFromPost()
    {
        // Only set data from $post to App class
        if ($this->template !== 'app') {
/nas/content/live/tribecavp/wp-content/themes/tribecavp/vendor/soberwp/controller/controller.php
 
        // Set the params required for template param
        $controller->__setParams();
 
        // Determine template location to expose data
        $location = "sage/template/{$controller->__getTemplateParam()}-data/data";
 
        // Pass data to filter
        add_filter($location, function ($data) use ($container, $class) {
            // Recreate the class so that $post is included
            $controller = $container->make($class);
 
            // Params
            $controller->__setParams();
 
            // Lifecycle
            $controller->__before();
 
            // Data
            $controller->__setData($data);
 
            // Lifecycle
            $controller->__after();
 
            // Return
            return $controller->__getData();
        }, 10, 2);
    }
}
 
/**
 * Blade
 */
function blade()
{
    // Get Sage function
    $sage = sage();
 
    // Return if function does not exist
    if (!$sage) {
/nas/content/live/tribecavp/wp-includes/class-wp-hook.php
 
        $this->iterations[ $nesting_level ] = $this->priorities;
 
        $num_args = count( $args );
 
        do {
            $this->current_priority[ $nesting_level ] = current( $this->iterations[ $nesting_level ] );
 
            $priority = $this->current_priority[ $nesting_level ];
 
            foreach ( $this->callbacks[ $priority ] as $the_ ) {
                if ( ! $this->doing_action ) {
                    $args[0] = $value;
                }
 
                // Avoid the array_slice() if possible.
                if ( 0 === $the_['accepted_args'] ) {
                    $value = call_user_func( $the_['function'] );
                } elseif ( $the_['accepted_args'] >= $num_args ) {
                    $value = call_user_func_array( $the_['function'], $args );
                } else {
                    $value = call_user_func_array( $the_['function'], array_slice( $args, 0, $the_['accepted_args'] ) );
                }
            }
        } while ( false !== next( $this->iterations[ $nesting_level ] ) );
 
        unset( $this->iterations[ $nesting_level ] );
        unset( $this->current_priority[ $nesting_level ] );
 
        --$this->nesting_level;
 
        return $value;
    }
 
    /**
     * Calls the callback functions that have been added to an action hook.
     *
     * @since 4.7.0
     *
     * @param array $args Parameters to pass to the callback functions.
/nas/content/live/tribecavp/wp-includes/plugin.php
        $all_args = func_get_args(); // phpcs:ignore PHPCompatibility.FunctionUse.ArgumentFunctionsReportCurrentValue.NeedsInspection
        _wp_call_all_hook( $all_args );
    }
 
    if ( ! isset( $wp_filter[ $hook_name ] ) ) {
        if ( isset( $wp_filter['all'] ) ) {
            array_pop( $wp_current_filter );
        }
 
        return $value;
    }
 
    if ( ! isset( $wp_filter['all'] ) ) {
        $wp_current_filter[] = $hook_name;
    }
 
    // Pass the value to WP_Hook.
    array_unshift( $args, $value );
 
    $filtered = $wp_filter[ $hook_name ]->apply_filters( $value, $args );
 
    array_pop( $wp_current_filter );
 
    return $filtered;
}
 
/**
 * Calls the callback functions that have been added to a filter hook, specifying arguments in an array.
 *
 * @since 3.0.0
 *
 * @see apply_filters() This function is identical, but the arguments passed to the
 *                      functions hooked to `$hook_name` are supplied using an array.
 *
 * @global WP_Hook[] $wp_filter         Stores all of the filters and actions.
 * @global int[]     $wp_filters        Stores the number of times each filter was triggered.
 * @global string[]  $wp_current_filter Stores the list of current filters with the current one last.
 *
 * @param string $hook_name The name of the filter hook.
 * @param array  $args      The arguments supplied to the functions hooked to `$hook_name`.
/nas/content/live/tribecavp/wp-content/themes/tribecavp/app/filters.php
    'frontpage', 'page', 'paged', 'search', 'single', 'singular', 'attachment', 'embed'
])->map(function ($type) {
    add_filter("{$type}_template_hierarchy", __NAMESPACE__.'\\filter_templates');
});
 
/**
 * Render page using Blade
 */
add_filter('template_include', function ($template) {
    collect(['get_header', 'wp_head'])->each(function ($tag) {
        ob_start();
        do_action($tag);
        $output = ob_get_clean();
        remove_all_actions($tag);
        add_action($tag, function () use ($output) {
            echo $output;
        });
    });
    $data = collect(get_body_class())->reduce(function ($data, $class) use ($template) {
        return apply_filters("sage/template/{$class}/data", $data, $template);
    }, []);
    if ($template) {
        echo template($template, $data);
        return get_stylesheet_directory().'/index.php';
    }
    return $template;
}, PHP_INT_MAX);
 
/**
 * Render comments.blade.php
 */
add_filter('comments_template', function ($comments_template) {
    $comments_template = str_replace(
        [get_stylesheet_directory(), get_template_directory()],
        '',
        $comments_template
    );
 
    $data = collect(get_body_class())->reduce(function ($data, $class) use ($comments_template) {
        return apply_filters("sage/template/{$class}/data", $data, $comments_template);
[internal]
/nas/content/live/tribecavp/wp-content/themes/tribecavp/vendor/illuminate/support/Collection.php
     */
    public function random($number = null)
    {
        if (is_null($number)) {
            return Arr::random($this->items);
        }
 
        return new static(Arr::random($this->items, $number));
    }
 
    /**
     * Reduce the collection to a single value.
     *
     * @param  callable  $callback
     * @param  mixed  $initial
     * @return mixed
     */
    public function reduce(callable $callback, $initial = null)
    {
        return array_reduce($this->items, $callback, $initial);
    }
 
    /**
     * Create a collection of all elements that do not pass a given truth test.
     *
     * @param  callable|mixed  $callback
     * @return static
     */
    public function reject($callback)
    {
        if ($this->useAsCallable($callback)) {
            return $this->filter(function ($value, $key) use ($callback) {
                return ! $callback($value, $key);
            });
        }
 
        return $this->filter(function ($item) use ($callback) {
            return $item != $callback;
        });
    }
/nas/content/live/tribecavp/wp-content/themes/tribecavp/app/filters.php
])->map(function ($type) {
    add_filter("{$type}_template_hierarchy", __NAMESPACE__.'\\filter_templates');
});
 
/**
 * Render page using Blade
 */
add_filter('template_include', function ($template) {
    collect(['get_header', 'wp_head'])->each(function ($tag) {
        ob_start();
        do_action($tag);
        $output = ob_get_clean();
        remove_all_actions($tag);
        add_action($tag, function () use ($output) {
            echo $output;
        });
    });
    $data = collect(get_body_class())->reduce(function ($data, $class) use ($template) {
        return apply_filters("sage/template/{$class}/data", $data, $template);
    }, []);
    if ($template) {
        echo template($template, $data);
        return get_stylesheet_directory().'/index.php';
    }
    return $template;
}, PHP_INT_MAX);
 
/**
 * Render comments.blade.php
 */
add_filter('comments_template', function ($comments_template) {
    $comments_template = str_replace(
        [get_stylesheet_directory(), get_template_directory()],
        '',
        $comments_template
    );
 
    $data = collect(get_body_class())->reduce(function ($data, $class) use ($comments_template) {
        return apply_filters("sage/template/{$class}/data", $data, $comments_template);
    }, []);
/nas/content/live/tribecavp/wp-includes/class-wp-hook.php
 
        $this->iterations[ $nesting_level ] = $this->priorities;
 
        $num_args = count( $args );
 
        do {
            $this->current_priority[ $nesting_level ] = current( $this->iterations[ $nesting_level ] );
 
            $priority = $this->current_priority[ $nesting_level ];
 
            foreach ( $this->callbacks[ $priority ] as $the_ ) {
                if ( ! $this->doing_action ) {
                    $args[0] = $value;
                }
 
                // Avoid the array_slice() if possible.
                if ( 0 === $the_['accepted_args'] ) {
                    $value = call_user_func( $the_['function'] );
                } elseif ( $the_['accepted_args'] >= $num_args ) {
                    $value = call_user_func_array( $the_['function'], $args );
                } else {
                    $value = call_user_func_array( $the_['function'], array_slice( $args, 0, $the_['accepted_args'] ) );
                }
            }
        } while ( false !== next( $this->iterations[ $nesting_level ] ) );
 
        unset( $this->iterations[ $nesting_level ] );
        unset( $this->current_priority[ $nesting_level ] );
 
        --$this->nesting_level;
 
        return $value;
    }
 
    /**
     * Calls the callback functions that have been added to an action hook.
     *
     * @since 4.7.0
     *
     * @param array $args Parameters to pass to the callback functions.
/nas/content/live/tribecavp/wp-includes/plugin.php
        $all_args = func_get_args(); // phpcs:ignore PHPCompatibility.FunctionUse.ArgumentFunctionsReportCurrentValue.NeedsInspection
        _wp_call_all_hook( $all_args );
    }
 
    if ( ! isset( $wp_filter[ $hook_name ] ) ) {
        if ( isset( $wp_filter['all'] ) ) {
            array_pop( $wp_current_filter );
        }
 
        return $value;
    }
 
    if ( ! isset( $wp_filter['all'] ) ) {
        $wp_current_filter[] = $hook_name;
    }
 
    // Pass the value to WP_Hook.
    array_unshift( $args, $value );
 
    $filtered = $wp_filter[ $hook_name ]->apply_filters( $value, $args );
 
    array_pop( $wp_current_filter );
 
    return $filtered;
}
 
/**
 * Calls the callback functions that have been added to a filter hook, specifying arguments in an array.
 *
 * @since 3.0.0
 *
 * @see apply_filters() This function is identical, but the arguments passed to the
 *                      functions hooked to `$hook_name` are supplied using an array.
 *
 * @global WP_Hook[] $wp_filter         Stores all of the filters and actions.
 * @global int[]     $wp_filters        Stores the number of times each filter was triggered.
 * @global string[]  $wp_current_filter Stores the list of current filters with the current one last.
 *
 * @param string $hook_name The name of the filter hook.
 * @param array  $args      The arguments supplied to the functions hooked to `$hook_name`.
/nas/content/live/tribecavp/wp-includes/template-loader.php
            if ( 'is_attachment' === $tag ) {
                remove_filter( 'the_content', 'prepend_attachment' );
            }
 
            break;
        }
    }
 
    if ( ! $template ) {
        $template = get_index_template();
    }
 
    /**
     * Filters the path of the current template before including it.
     *
     * @since 3.0.0
     *
     * @param string $template The path of the template to include.
     */
    $template = apply_filters( 'template_include', $template );
    if ( $template ) {
        include $template;
    } elseif ( current_user_can( 'switch_themes' ) ) {
        $theme = wp_get_theme();
        if ( $theme->errors() ) {
            wp_die( $theme->errors() );
        }
    }
    return;
}
 
/nas/content/live/tribecavp/wp-blog-header.php
<?php
/**
 * Loads the WordPress environment and template.
 *
 * @package WordPress
 */
 
if ( ! isset( $wp_did_header ) ) {
 
    $wp_did_header = true;
 
    // Load the WordPress library.
    require_once __DIR__ . '/wp-load.php';
 
    // Set up the WordPress query.
    wp();
 
    // Load the theme template.
    require_once ABSPATH . WPINC . '/template-loader.php';
 
}
 
/nas/content/live/tribecavp/index.php
<?php
/**
 * Front to the WordPress application. This file doesn't do anything, but loads
 * wp-blog-header.php which does and tells WordPress to load the theme.
 *
 * @package WordPress
 */
 
/**
 * Tells WordPress to load the WordPress theme and output it.
 *
 * @var bool
 */
define( 'WP_USE_THEMES', true );
 
/** Loads the WordPress Environment and Template */
require __DIR__ . '/wp-blog-header.php';
 

Environment & details:

empty
empty
empty
empty
empty
Key Value
SERVER_SOFTWARE Apache
REQUEST_URI /portfolio/porter-road/
REDIRECT_HAVE_ORIGINAL_USER_AGENT claudebot
REDIRECT_HTTPS on
REDIRECT_IS_WPE 1
REDIRECT_WPE_CAN_WRITE_DISK 0
REDIRECT_WPENGINE_PHPSESSIONS on
REDIRECT_WPE_HEARTBEAT_AUTOSAVE_ONLY on
REDIRECT_WPENGINE_FORCE_STRONG_PASSWORDS on
REDIRECT_WPENGINE_CLEAR_EXPIRED_COOKIES off
REDIRECT_WPENGINE_ACCOUNT tribecavp
REDIRECT_WPENGINE_SESSION_LOCKING on
REDIRECT_STATUS 200
HAVE_ORIGINAL_USER_AGENT claudebot
HTTPS on
IS_WPE 1
WPE_CAN_WRITE_DISK 0
WPENGINE_PHPSESSIONS on
WPE_HEARTBEAT_AUTOSAVE_ONLY on
WPENGINE_FORCE_STRONG_PASSWORDS on
WPENGINE_CLEAR_EXPIRED_COOKIES off
WPENGINE_ACCOUNT tribecavp
WPENGINE_SESSION_LOCKING on
HTTP_HOST tribecavp.com
HTTP_CONNECTION close
HTTP_X_IS_BOT 1
HTTP_USER_AGENT claudebot
HTTP_X_FORWARDED_HOST tribecavp.com
HTTP_X_WPE_SSL 1
HTTP_X_WPE_INSTALL_NAME tribecavp
HTTP_WPE_READONLY on
HTTP_CF_CONNECTING_IP 44.197.113.64, 44.197.113.64, 44.197.113.64
HTTP_X_WPE_REQUEST_ID 95a13842f1f43569ea50302e0106e330
HTTP_X_WPE_LOCAL_SSL 1
HTTP_X_FORWARDED_PROTO https
HTTP_X_SUCURI_CLIENTIP 44.197.113.64
HTTP_X_SUCURI_COUNTRY US
HTTP_ACCEPT */*
HTTP_REFERER https://tribecavp.com/showcase/porter-road/
HTTP_X_WORDPRESS_TYPE DEFAULT
HTTP_WPE_UPLOAD_MAX_FILESIZE 50M
HTTP_WPE_POST_MAX_SIZE 100M
HTTP_VIA 1.1 pod-140705:varnish:106 (Varnish/7.4)
HTTP_X_UA_ORIGINAL claudebot
HTTP_RAWHOST tribecavp.com
HTTP_X_BOT_CACHE YES
HTTP_X_CACHE_GROUP bot
HTTP_ACCEPT_ENCODING gzip
PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
SERVER_SIGNATURE
SERVER_NAME tribecavp.com
SERVER_ADDR 127.0.0.1
SERVER_PORT 80
REMOTE_ADDR 44.197.113.64
DOCUMENT_ROOT /nas/content/live/tribecavp
REQUEST_SCHEME http
CONTEXT_PREFIX
CONTEXT_DOCUMENT_ROOT /nas/content/live/tribecavp
SERVER_ADMIN [no address given]
SCRIPT_FILENAME /nas/content/live/tribecavp/index.php
REMOTE_PORT 34490
REDIRECT_URL /portfolio/porter-road/
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.0
REQUEST_METHOD GET
QUERY_STRING
SCRIPT_NAME /index.php
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1710848069.7
REQUEST_TIME 1710848069
Key Value
APACHE2_OPCACHE_MAX_FILE_SIZE_BYTES 614400
APACHE2_OPCACHE_MEMORY_CONSUMPTION 1673
HOSTNAME pod-140705:apache2_74:v0.3.4
SHLVL 0
APACHE_RUN_DIR /var/run/apache2
APACHE_PID_FILE /var/run/apache2/apache2.pid
APACHE2_OPCACHE_REVALIDATE_FREQ 10
_ /usr/sbin/apache2ctl
APACHE2_OPCACHE_HUGE_CODE_PAGES 1
APACHE2_LISTEN_PORT_RW 6778
PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
APACHE_LOCK_DIR /var/lock/apache2
APACHE2_OPCACHE_MAX_WASTED_PERCENTAGE 5
LANG C
APACHE2_OPCACHE_MAX_ACCELERATED_FILES 1000000
APACHE_RUN_USER www-data
APACHE_RUN_GROUP www-data
APACHE2_LISTEN_PORT 6779
APACHE_LOG_DIR /var/log/apache2
PWD /
BASE_VERSION 7.4-zend
WPENGINE_ACCOUNT tribecavp
WPENGINE_PHPSESSIONS on
WPENGINE_DB_SESSIONS off
0. Whoops\Handler\PrettyPageHandler