How to avoid this bug in Scrutinizer for Laravel project?

159 Views Asked by At

When I check my Laravel app on Scrutinizer shows me some bugs like this one:

The method with does only exist in Illuminate\View\View, but not in Illuminate\Contracts\View\Factory. 

The code is:

$data['records'] = Record::all()->count();
$data['users'] = User::all()->count();

return view('dashboard.index')
        ->with('data', $data);

It works perfect, but on every analisys it shows me the same error. I think is a problem with my View class instantation but I don't know how to solve it.

Is there any good guide to configure Scrutinizer for Laravel projects?

Thanks in advance.

0

There are 0 best solutions below