Symfony \ Component \ Debug \ Exception \ FatalThrowableError (E_ERROR)
Call to a member function postsByPriority() on null Symfony\Component\Debug\Exception\FatalThrowableError thrown with message "Call to a member function postsByPriority() on null" Stacktrace: #0 Symfony\Component\Debug\Exception\FatalThrowableError in /home/u389442924/domains/newswindow24.com/public_html/app/Http/Controllers/User/HomeController.php:51
Application frames (1) All frames (1)
0
Symfony
\
Component
\
Debug
\
Exception
\
FatalThrowableError
/
app
/
Http
/
Controllers
/
User
/
HomeController.php
51
/
home
/
u389442924
/
domains
/
newswindow24.com
/
public_html
/
app
/
Http
/
Controllers
/
User
/
HomeController.php
        $question_post=$question_tag->postsByCreatedAt()->where('status',1)->first();
 
        $ads_tag=tag::where('meta_key','ads')->first();
        $ads_posts=$ads_tag->postsByCreatedAt()->where('status',1)->take(5)->get();
 
        return view('user.home',['tag1'=>$tag1,'question_tag'=>$question_tag,
        'ads_tag'=>$ads_tag,
        'tag1_posts'=>$tag1_posts,'question_post'=>$question_post,
        'ads_posts'=>$ads_posts,'video_posts'=>$video_posts,
        'all_categories'=>$all_categories,'all_tags'=>$all_tags]);
    }
 
    // category posts
    public function singlenews($id)
    {
        $tag1=tag::where('priority','1')->first();
        $tag1_posts = $tag1->postsByPriority()->where('status',1)->take(10)->get();
 
        $category=category::find($id);
        $posts=$category->postsByPriority()->where('status',1)->paginate(7);
 
        return view('user.SingleNews',['posts'=>$posts,'category'=>$category,
        'tag1'=>$tag1,'tag1_posts'=>$tag1_posts]);
    }
 
    // tag posts
    public function singletagnews($id)
    {
        $tag = tag::find($id);
        $posts=$tag->postsByPriority()->where('status',1)->paginate(7);
 
        return view('user.otherNews',['tag'=>$tag,'posts'=>$posts]);
    }
 
    // state news
    public function newsByState($id)
    {
        $tag1=tag::where('priority','1')->first();
        $tag1_posts = $tag1->postsByPriority()->where('status',1)->take(10)->get();
 
Arguments
  1. "Call to a member function postsByPriority() 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
"newswindow24.com"
HTTP_USER_AGENT
"claudebot"
HTTP_X_FORWARDED_FOR
"44.197.114.92"
HTTP_X_FORWARDED_PROTO
"https"
HTTP_X_REAL_IP
"44.197.114.92"
HTTP_X_REAL_PORT
"46592"
HTTP_X_FORWARDED_PORT
"443"
HTTP_X_PORT
"443"
HTTP_X_LSCACHE
"1"
DOCUMENT_ROOT
"/home/u389442924/domains/newswindow24.com/public_html"
REMOTE_ADDR
"44.197.114.92"
REMOTE_PORT
"61332"
SERVER_ADDR
"2a02:4780:b:837:0:1736:6d6c:3"
SERVER_NAME
"newswindow24.com"
SERVER_ADMIN
""
SERVER_PORT
"443"
REQUEST_SCHEME
"https"
REQUEST_URI
"/news/31"
REDIRECT_URL
"/news/31"
REDIRECT_REQUEST_METHOD
"GET"
PROXY_REMOTE_ADDR
"2a02:4780:2c:3::4"
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/u389442924/domains/newswindow24.com/public_html/index.php"
QUERY_STRING
""
SCRIPT_URI
"https://newswindow24.com/news/31"
SCRIPT_URL
"/news/31"
SCRIPT_NAME
"/index.php"
SERVER_PROTOCOL
"HTTP/1.1"
SERVER_SOFTWARE
"LiteSpeed"
REQUEST_METHOD
"GET"
X-LSCACHE
"on,crawler,esi,combine"
PHP_SELF
"/index.php"
REQUEST_TIME_FLOAT
1711640764.3676
REQUEST_TIME
1711640764
APP_NAME
"NewsWindow24"
APP_ENV
"local"
APP_KEY
"base64:QAMqywGDyr19kivzIZI11UkzJHiNnVxxMG+7+spzItA="
APP_DEBUG
"true"
APP_URL
"https://www.newswindow24.com/"
LOG_CHANNEL
"stack"
DB_CONNECTION
"mysql"
DB_HOST
"localhost"
DB_PORT
"3308"
DB_DATABASE
"u389442924_newswindowdb"
DB_USERNAME
"u389442924_newswindowdb"
DB_PASSWORD
"Ashish@!@#123"
BROADCAST_DRIVER
"log"
CACHE_DRIVER
"file"
QUEUE_CONNECTION
"sync"
SESSION_DRIVER
"file"
SESSION_LIFETIME
"120"
REDIS_HOST
"127.0.0.1"
REDIS_PASSWORD
"null"
REDIS_PORT
"6379"
MAIL_DRIVER
"smtp"
MAIL_HOST
"sg2plcpnl0118.prod.sin2.secureserver.ne"
MAIL_PORT
"465"
MAIL_USERNAME
"info@rvinfoservices.com"
MAIL_PASSWORD
"rvinfo@1234"
MAIL_ENCRYPTION
"ssl"
PUSHER_APP_ID
""
PUSHER_APP_KEY
""
PUSHER_APP_SECRET
""
PUSHER_APP_CLUSTER
"mt1"
MIX_PUSHER_APP_KEY
""
MIX_PUSHER_APP_CLUSTER
"mt1"
GOOGLE_CLIENT_ID
"244693949323-k2kdo5bq6mb6a3vfl8e0s3dft2b6kdmt.apps.googleusercontent.com"
GOOGLE_CLIENT_SECRET
"lBYYQtTXb_YRp8IuHbdR-Tmd"
GOOGLE_REDIRECT
"https://www.newswindow24.com/login/google"
Key Value
LSPHP_ProcessGroup
"on"
PATH
"/usr/local/bin:/bin:/usr/bin"
APP_NAME
"NewsWindow24"
APP_ENV
"local"
APP_KEY
"base64:QAMqywGDyr19kivzIZI11UkzJHiNnVxxMG+7+spzItA="
APP_DEBUG
"true"
APP_URL
"https://www.newswindow24.com/"
LOG_CHANNEL
"stack"
DB_CONNECTION
"mysql"
DB_HOST
"localhost"
DB_PORT
"3308"
DB_DATABASE
"u389442924_newswindowdb"
DB_USERNAME
"u389442924_newswindowdb"
DB_PASSWORD
"Ashish@!@#123"
BROADCAST_DRIVER
"log"
CACHE_DRIVER
"file"
QUEUE_CONNECTION
"sync"
SESSION_DRIVER
"file"
SESSION_LIFETIME
"120"
REDIS_HOST
"127.0.0.1"
REDIS_PASSWORD
"null"
REDIS_PORT
"6379"
MAIL_DRIVER
"smtp"
MAIL_HOST
"sg2plcpnl0118.prod.sin2.secureserver.ne"
MAIL_PORT
"465"
MAIL_USERNAME
"info@rvinfoservices.com"
MAIL_PASSWORD
"rvinfo@1234"
MAIL_ENCRYPTION
"ssl"
PUSHER_APP_ID
""
PUSHER_APP_KEY
""
PUSHER_APP_SECRET
""
PUSHER_APP_CLUSTER
"mt1"
MIX_PUSHER_APP_KEY
""
MIX_PUSHER_APP_CLUSTER
"mt1"
GOOGLE_CLIENT_ID
"244693949323-k2kdo5bq6mb6a3vfl8e0s3dft2b6kdmt.apps.googleusercontent.com"
GOOGLE_CLIENT_SECRET
"lBYYQtTXb_YRp8IuHbdR-Tmd"
GOOGLE_REDIRECT
"https://www.newswindow24.com/login/google"
0. Whoops\Handler\PrettyPageHandler