Symfony \ Component \ Debug \ Exception \ FatalThrowableError (E_ERROR)
Call to a member function translate() on null Symfony\Component\Debug\Exception\FatalThrowableError thrown with message "Call to a member function translate() on null" Stacktrace: #0 Symfony\Component\Debug\Exception\FatalThrowableError in /var/www/milma.com/app/Http/Controllers/WebsiteController.php:240
Application frames (1) All frames (1)
0
Symfony
\
Component
\
Debug
\
Exception
\
FatalThrowableError
/
app
/
Http
/
Controllers
/
WebsiteController.php
240
/
var
/
www
/
milma.com
/
app
/
Http
/
Controllers
/
WebsiteController.php
    $siteinfo = Siteinformation::first()->translate('locale',$language);
 
      $notice = Noticeboard::find($noticeid);
 
      return view('notices.htmlnotices',compact('siteinfo','productcategories','cattlefeedcategories','federationunits','unions','notice'));
 
    }
 
  //products functions
  public function showfederationunit($id)
  {
    $language = $this->getlanguage();
    $productcategories = $this->getproduct_category($language);
    $cattlefeedcategories = $this->getcattlefeed_category($language);
    $federationunits = $this->getfederation_units($language);
    $unions          = $this->getunion_list($language);
    $siteinfo = Siteinformation::first()->translate('locale',$language);
 
 
      $thisfederationunit =  FederationUnit::find($id)->translate('locale',$language);
      $images = $this->getimages($thisfederationunit->image);
      return view('newsite.federationunits.perticularunit',compact('siteinfo','productcategories','cattlefeedcategories','federationunits','thisfederationunit','images','unions'));
 
 
   }
 
  //member unions functions
  public function showperticularunion($id)
  {
    $language = $this->getlanguage();
    $productcategories = $this->getproduct_category($language);
    $cattlefeedcategories = $this->getcattlefeed_category($language);
    $federationunits = $this->getfederation_units($language);
    $unions          = $this->getunion_list($language);
    $siteinfo = Siteinformation::first()->translate('locale',$language);
 
 
      $thisunion =  Union::with('units')->where('id',$id)->first()->translate('locale',$language);
      $unionimages = $this->getimages($thisunion->union_images);
      return view('unions.perticularunion',compact('siteinfo','productcategories','cattlefeedcategories','federationunits','unions','unionimages','thisunion'));
Arguments
  1. "Call to a member function translate() on null"
    

Environment & details:

empty
empty
empty
empty
empty
Key Value
REDIRECT_HTTPS
"on"
REDIRECT_SSL_TLS_SNI
"milma.com"
REDIRECT_STATUS
"200"
HTTPS
"on"
SSL_TLS_SNI
"milma.com"
HTTP_ACCEPT
"*/*"
HTTP_USER_AGENT
"claudebot"
HTTP_HOST
"milma.com"
PATH
"**********************************************************************"
SERVER_SIGNATURE
"<address>Apache/2.4.41 (Ubuntu) Server at milma.com Port 443</address>\n"
SERVER_SOFTWARE
"Apache/2.4.41 (Ubuntu)"
SERVER_NAME
"milma.com"
SERVER_ADDR
"172.31.26.254"
SERVER_PORT
"443"
REMOTE_ADDR
"3.238.228.191"
DOCUMENT_ROOT
"**************************"
REQUEST_SCHEME
"https"
CONTEXT_PREFIX
""
CONTEXT_DOCUMENT_ROOT
"/var/www/milma.com/public/"
SERVER_ADMIN
"systems@milma.com"
SCRIPT_FILENAME
"***********************************"
REMOTE_PORT
"43864"
REDIRECT_URL
"/federationunits/3"
GATEWAY_INTERFACE
"CGI/1.1"
SERVER_PROTOCOL
"HTTP/1.1"
REQUEST_METHOD
"GET"
QUERY_STRING
""
REQUEST_URI
"/federationunits/3"
SCRIPT_NAME
"**********"
PHP_SELF
"**********"
REQUEST_TIME_FLOAT
"**************"
REQUEST_TIME
"**********"
empty
0. Whoops\Handler\PrettyPageHandler