Symfony \ Component \ Debug \ Exception \ FatalThrowableError (E_ERROR)
Call to a member function publications() on null Symfony\Component\Debug\Exception\FatalThrowableError thrown with message "Call to a member function publications() on null" Stacktrace: #0 Symfony\Component\Debug\Exception\FatalThrowableError in /home/u576102256/domains/mtagencia.co/public_html/blog/AppGestorContenido/app/Http/Controllers/website/BlogController.php:240
Application frames (1) All frames (1)
0
Symfony
\
Component
\
Debug
\
Exception
\
FatalThrowableError
/
app
/
Http
/
Controllers
/
website
/
BlogController.php
240
/
home
/
u576102256
/
domains
/
mtagencia.co
/
public_html
/
blog
/
AppGestorContenido
/
app
/
Http
/
Controllers
/
website
/
BlogController.php
        }
        return view('website.blog.listByTag', ['publications' => $publications, 'categories' => $categories, 'recentPosts' => $recentPosts, 'comentRecent' => $comentRecent, 'tags' => $tags, 'tag' => $tag]);
    }
 
    public function getPublication($slug)
    {
        return Publication::where('slug', $slug)->withCount('comments')->first();
    }
 
    public function getPublicationsActivated()
    {
        return Publication::where('is_active', '1')->orderBy('id', 'DESC')->get();
    }
 
    public function getPublicationsOfCategory(Request $request, $category)
    {
        if ($request->has('q')) {
            $publications = $category->publications()->where('is_active', '1')->where('title', 'like', '%'.$request->q.'%')->orderBy('id', 'DESC')->withCount('comments')->paginate(5);
        } else {
            $publications = $category->publications()->where('is_active', '1')->orderBy('id', 'DESC')->withCount('comments')->paginate(5);
        }
 
        foreach ($publications as &$post) {
            $post->categories = $post->categories()->get();
        }
 
        return $publications;
    }
 
    public function getPublicationsOfTag(Request $request)
    {
        if ($request->has('tag')) {
            $publications = Publication::where('is_active', '1')->orderBy('id', 'DESC')->where('tags', 'like', '%'.$request->tag.'%')->withCount('comments')->paginate(5);
        } else {
            $publications = Publication::where('is_active', '1')->orderBy('id', 'DESC')->withCount('comments')->paginate(5);
        }
 
        foreach ($publications as &$post) {
            $post->categories = $post->categories()->get();
        }
Arguments
  1. "Call to a member function publications() on null"
    

Environment & details:

empty
empty
empty
empty
empty
Key Value
LSPHP_ProcessGroup
"on"
PATH
"/usr/local/bin:/bin:/usr/bin"
HTTP_ACCEPT
"*/*"
HTTP_ACCEPT_ENCODING
"gzip"
HTTP_HOST
"mtagencia.co"
HTTP_USER_AGENT
"claudebot"
HTTP_X_FORWARDED_FOR
"3.238.195.81"
HTTP_X_FORWARDED_PROTO
"https"
HTTP_X_REAL_IP
"3.238.195.81"
HTTP_X_REAL_PORT
"58546"
HTTP_X_FORWARDED_PORT
"443"
HTTP_X_PORT
"443"
HTTP_X_LSCACHE
"1"
DOCUMENT_ROOT
"/home/u576102256/domains/mtagencia.co/public_html"
REMOTE_ADDR
"3.238.195.81"
REMOTE_PORT
"50964"
SERVER_ADDR
"2a02:4780:b:743:0:2256:9f70:3"
SERVER_NAME
"mtagencia.co"
SERVER_ADMIN
""
SERVER_PORT
"443"
REQUEST_SCHEME
"https"
REQUEST_URI
"/blog/categoria/tendencia-digital"
REDIRECT_URL
"/blog/categoria/tendencia-digital"
REDIRECT_REQUEST_METHOD
"GET"
PROXY_REMOTE_ADDR
"2a02:4780:2c:1::8"
HTTPS
"on"
CRAWLER_USLEEP
"1000"
CRAWLER_LOAD_LIMIT_ENFORCE
"25"
REDIRECT_STATUS
"200"
SSL_PROTOCOL
"TLSv1.3"
SSL_CIPHER
"TLS_AES_256_GCM_SHA384"
SSL_CIPHER_USEKEYSIZE
"256"
SSL_CIPHER_ALGKEYSIZE
"256"
SCRIPT_FILENAME
"/home/u576102256/domains/mtagencia.co/public_html/blog/index.php"
QUERY_STRING
""
SCRIPT_URI
"https://mtagencia.co/blog/categoria/tendencia-digital"
SCRIPT_URL
"/blog/categoria/tendencia-digital"
SCRIPT_NAME
"/blog/index.php"
SERVER_PROTOCOL
"HTTP/1.1"
SERVER_SOFTWARE
"LiteSpeed"
REQUEST_METHOD
"GET"
X-LSCACHE
"on,crawler,esi,combine"
PHP_SELF
"/blog/index.php"
REQUEST_TIME_FLOAT
1711642543.8629
REQUEST_TIME
1711642543
APP_NAME
"Laravel"
APP_ENV
"local"
APP_KEY
"base64:DFZMHyUa/exZTHEdtemTs3Ib0/Z/fA6qCeynQ+8rneU="
APP_DEBUG
"true"
APP_URL
"http://127.0.0.1"
LOG_CHANNEL
"stack"
DB_CONNECTION
"mysql"
DB_HOST
"localhost"
DB_PORT
"3306"
DB_DATABASE
"u576102256_blogmt"
DB_USERNAME
"u576102256_blogmt"
DB_PASSWORD
"Diego,2013"
Key Value
LSPHP_ProcessGroup
"on"
PATH
"/usr/local/bin:/bin:/usr/bin"
APP_NAME
"Laravel"
APP_ENV
"local"
APP_KEY
"base64:DFZMHyUa/exZTHEdtemTs3Ib0/Z/fA6qCeynQ+8rneU="
APP_DEBUG
"true"
APP_URL
"http://127.0.0.1"
LOG_CHANNEL
"stack"
DB_CONNECTION
"mysql"
DB_HOST
"localhost"
DB_PORT
"3306"
DB_DATABASE
"u576102256_blogmt"
DB_USERNAME
"u576102256_blogmt"
DB_PASSWORD
"Diego,2013"
0. Whoops\Handler\PrettyPageHandler