Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

196
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!