The expression view('home'); of type Illuminate\View\View|Ill...\Contracts\View\Factory adds the type Illuminate\Contracts\View\Factory to the return on line 14 which is incompatible with the return type documented by Interfaces\Http\Controllers\HomeController::index of type Illuminate\View\View.