Symfony \ Component \ Debug \ Exception \ FatalThrowableError (E_ERROR)
Call to a member function increment() on null Symfony\Component\Debug\Exception\FatalThrowableError thrown with message "Call to a member function increment() on null" Stacktrace: #0 Symfony\Component\Debug\Exception\FatalThrowableError in /home/agautosusados.com.ar/app/Http/Controllers/Rutas.php:96
Application frames (1) All frames (1)
0
Symfony
\
Component
\
Debug
\
Exception
\
FatalThrowableError
/
app
/
Http
/
Controllers
/
Rutas.php
96
/
home
/
agautosusados.com.ar
/
app
/
Http
/
Controllers
/
Rutas.php
    public function vehiculo() {

        return view('vehiculo')->with('vehiculos', Vehiculo::all());
    }

    public function vehiculo_id($id) {

        $vehiculo = Vehiculo::where('idvehiculos',$id)->first();

        $vehiculo->increment('visitas');

        return view('vehiculo')->with('vehiculo', $vehiculo);
    }

    public function vehiculo_slug($slug) {

        $vehiculo = Vehiculo::where('slug',$slug)->first();

        $vehiculo->increment('visitas');

        return view('vehiculo')->with('vehiculo', $vehiculo);
    }

    public function prueba() {
        return view('codigosPrueba');
    }

    public function alerta() {
        return view('alerta')->with('marcas', Marca::all());
    }
    public function select() {
        return view('select');
    }
}
 
Arguments
  1. "Call to a member function increment() on null"
    

Environment & details:

empty
empty
empty
empty
empty
Key Value
PHPRC
"/home/agautosusados.com.ar/fcgi-bin/../etc/php7.2"
SCRIPT_FILENAME
"/home/agautosusados.com.ar/public/index.php"
PATH
"/sbin:/usr/sbin:/bin:/usr/bin"
PWD
"/home/agautosusados.com.ar/fcgi-bin"
SHLVL
"0"
PHP_FCGI_MAX_REQUESTS
"99999"
HTTP_CONNECTION
"close"
SCRIPT_NAME
"/index.php"
REQUEST_URI
"/vehiculo/200-toyota-hilux-sr-30d-2006"
QUERY_STRING
""
REQUEST_METHOD
"GET"
SERVER_PROTOCOL
"HTTP/1.1"
GATEWAY_INTERFACE
"CGI/1.1"
REDIRECT_URL
"/vehiculo/200-toyota-hilux-sr-30d-2006"
REMOTE_PORT
"33826"
SERVER_ADMIN
"root@localhost"
DOCUMENT_ROOT
"/home/agautosusados.com.ar/public"
REMOTE_ADDR
"52.90.50.252"
SERVER_PORT
"80"
SERVER_ADDR
"91.134.209.18"
SERVER_NAME
"agautosusados.com.ar"
SERVER_SOFTWARE
"Apache/2.2.15"
SERVER_SIGNATURE
""
HTTP_HOST
"agautosusados.com.ar"
HTTP_USER_AGENT
"claudebot"
HTTP_ACCEPT
"*/*"
SCRIPT_URI
"http://agautosusados.com.ar/vehiculo/200-toyota-hilux-sr-30d-2006"
SCRIPT_URL
"/vehiculo/200-toyota-hilux-sr-30d-2006"
REDIRECT_STATUS
"200"
REDIRECT_SCRIPT_URI
"http://agautosusados.com.ar/vehiculo/200-toyota-hilux-sr-30d-2006"
REDIRECT_SCRIPT_URL
"/vehiculo/200-toyota-hilux-sr-30d-2006"
FCGI_ROLE
"RESPONDER"
PHP_SELF
"/index.php"
REQUEST_TIME_FLOAT
1711641653.6468
REQUEST_TIME
1711641653
empty
0. Whoops\Handler\PrettyPageHandler