Symfony \ Component \ Debug \ Exception \ FatalThrowableError (E_ERROR)
Call to a member function articles() on null Symfony\Component\Debug\Exception\FatalThrowableError thrown with message "Call to a member function articles() on null" Stacktrace: #1 Symfony\Component\Debug\Exception\FatalThrowableError in /var/www/phplaravel/app/Http/Controllers/Things/ArticleController.php:87 #0 {main} in /var/www/phplaravel/public/index.php:0
1
Symfony\Component\Debug\Exception\FatalThrowableError
/app/Http/Controllers/Things/ArticleController.php87
0
{main}
/public/index.php0
/var/www/phplaravel/app/Http/Controllers/Things/ArticleController.php
            $the_article = Article::find($article);
 
            if ($the_article) {
 
            } else {
                if (Article::where('language.en_US.url', $article)->count() == 1) {
                    $the_article = Article::where('language.en_US.url', $article)->first();
                }
            }
 
            if ($the_article) {
            } else {
                $urlComponents = parse_url(url()->current());
 
                $count = Segment::where('type', 'page')->where('url_components.path', $urlComponents['path'])->count();
 
 
                $the_issue = PublicationIssue::where('key', $issue)->first();
 
                $the_article = $the_issue->articles()->where('language.en_US.url', $article)->first();
            }
 
            if ($the_article) {
 
                if(isset($the_article->views)) {
                    $views = $the_article->views;
                    if(isset($the_issue)) {
                        $views[$the_issue->id] = $count;
                    }
                    $the_article->views = $views;
                } else {
                    $the_article->views = [$the_issue->_id => $count];
                    $the_article->save();
                }
 
                $the_article->save();
 
                $webpage = WebPage::where('routename', \Route::getCurrentRoute()->getName())->first();
 
                return view('v1.home', ['template' => $webpage->template(), 'webpage' => $webpage, 'article' => $the_article]);
Arguments
  1. "Call to a member function articles() on null"
    
/var/www/phplaravel/public/index.php
<?php
 
/**
 * Laravel - A PHP Framework For Web Artisans
 *
 * @package  Laravel
 * @author   Taylor Otwell <taylorotwell@gmail.com>
 */
 
/*
|--------------------------------------------------------------------------
| Register The Auto Loader
|--------------------------------------------------------------------------
|
| Composer provides a convenient, automatically generated class loader for
| our application. We just need to utilize it! We'll simply require it
| into the script here so that we don't have to worry about manual
| loading any of our classes later on. It feels nice to relax.
|
*/
 
require __DIR__.'/../bootstrap/autoload.php';
 
/*
|--------------------------------------------------------------------------
| Turn On The Lights
|--------------------------------------------------------------------------
|
| We need to illuminate PHP development, so let us turn on the lights.
| This bootstraps the framework and gets it ready for use, then it
| will load up this application so that we can run it and send
| the responses back to the browser and delight our users.
|
*/
 
$app = require_once __DIR__.'/../bootstrap/app.php';
 
/*
|--------------------------------------------------------------------------
| Run The Application

Environment & details:

empty
empty
empty
empty
empty
Key Value
REDIRECT_STATUS
"200"
HTTP_X_FORWARDED_FOR
"3.235.249.219, 15.158.50.245"
HTTP_X_FORWARDED_PROTO
"http"
HTTP_X_FORWARDED_PORT
"80"
HTTP_HOST
"qlifemagazine.com"
HTTP_X_AMZN_TRACE_ID
"Root=1-66060255-1634842f6410a5733f0a89da"
HTTP_USER_AGENT
"claudebot"
HTTP_X_AMZ_CF_ID
"GczdAh6Lb61X-5OlbBsOoWAvSHAdd6okR_WiI79sVWxdZV8jVRa_sQ=="
HTTP_VIA
"2.0 02d40d77941fe6c2f8e7ff5156c01128.cloudfront.net (CloudFront)"
HTTP_ACCEPT
"*/*"
HTTP_CLOUDFRONT_IS_MOBILE_VIEWER
"false"
HTTP_CLOUDFRONT_IS_TABLET_VIEWER
"false"
HTTP_CLOUDFRONT_IS_SMARTTV_VIEWER
"false"
HTTP_CLOUDFRONT_IS_DESKTOP_VIEWER
"true"
HTTP_CLOUDFRONT_VIEWER_COUNTRY
"US"
HTTP_CLOUDFRONT_FORWARDED_PROTO
"https"
HTTP_CLOUDFRONT_VIEWER_ASN
"14618"
PATH
"/sbin:/usr/sbin:/bin:/usr/bin"
SERVER_SIGNATURE
""
SERVER_SOFTWARE
"Apache/2.4.58 (Amazon) PHP/7.2.34"
SERVER_NAME
"qlifemagazine.com"
SERVER_ADDR
"10.0.7.87"
SERVER_PORT
"80"
REMOTE_ADDR
"10.0.1.194"
DOCUMENT_ROOT
"/var/www/phplaravel/public"
REQUEST_SCHEME
"http"
CONTEXT_PREFIX
""
CONTEXT_DOCUMENT_ROOT
"/var/www/phplaravel/public"
SERVER_ADMIN
"root@localhost"
SCRIPT_FILENAME
"/var/www/phplaravel/public/index.php"
REMOTE_PORT
"49472"
REDIRECT_URL
"/newyork/qlife-new-york-march-2018/cabaret-chronicles"
GATEWAY_INTERFACE
"CGI/1.1"
SERVER_PROTOCOL
"HTTP/1.1"
REQUEST_METHOD
"GET"
QUERY_STRING
""
REQUEST_URI
"/newyork/qlife-new-york-march-2018/cabaret-chronicles"
SCRIPT_NAME
"/index.php"
PHP_SELF
"/index.php"
REQUEST_TIME_FLOAT
1711669845.728
REQUEST_TIME
1711669845
APP_ENV
"production"
APP_KEY
"base64:SoorvHVXlCOoujzxe+mdkoh8igTi+4DWuXYXnvLdZrY="
APP_DEBUG
"true"
APP_LOG_LEVEL
"false"
NSS_STRICT_NOFORK
"DISABLED"
MONGODB_DATABASE_HOST
"10.0.9.19"
LOCAL_CONFIG
"qlife"
CACHE_DRIVER
"memcached"
SESSION_DRIVER
"memcached"
QUEUE_DRIVER
"sqs"
Key Value
APP_ENV
"production"
APP_KEY
"base64:SoorvHVXlCOoujzxe+mdkoh8igTi+4DWuXYXnvLdZrY="
APP_DEBUG
"true"
APP_LOG_LEVEL
"false"
NSS_STRICT_NOFORK
"DISABLED"
MONGODB_DATABASE_HOST
"10.0.9.19"
LOCAL_CONFIG
"qlife"
CACHE_DRIVER
"memcached"
SESSION_DRIVER
"memcached"
QUEUE_DRIVER
"sqs"
0. Whoops\Handler\PrettyPageHandler