Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

198
Vistas
TypeError: Cannot read properties of null (reading 'name') In cpanel hosting

I am facing an unwanted and odd problem in my project. It's showing in one of my module's main index pages, displaying the following error.

TypeError: Cannot read properties of null (reading 'name').

In CPanel hosting

I have already checked the casing (OK). I tried to create another module (similar problem). Have a laravel through relationship in parent model(company). It's fine on my local machine and creates; edit route works fine in the live server (also, I have similar crud, which works fine)

Controller

public function index(Request $request)
{
    return Inertia::render('Pesticides/Index', [
        'pesticides' => Pesticide::with('company')
        ->filter($request->all())
            ->sorted()
            ->paginate()
            ->withQueryString(),
        'query'  => $request->all(),
    ]);
}

Model

class Pesticide extends Model
{
    public function units()
    {
       return $this->belongsTo(Unit::class);
    }

    public function company()
    {
       return $this->belongsTo(Company::class);
    }

    public function pesticideSale()
    {
       return $this->hasMany(PesticideSale::class);
    }
}

Please help.

I appreciate any help you can provide.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda