How to fix 'layout' method undefined in Laravel 8 with livewire

Viewed 1507

I am using vscode when i make a component .. it gives me an error undefined method at layout even if i replace it with extends the intelephense plugin gives me the same error

i installed ide_helper but it didn't work .. however the code works fine as expected


<?php

namespace App\Http\Livewire;


use Livewire\Component;


class AdminGradeComponent extends Component
{

  public function render()
  {
    return view('livewire.home-component')->layout('layouts.app'); //error here at layout
  }
}
1 Answers

here you need to close the round bracket...it´s missing

view('livewire.home-component'->

UPDATED: then nevermind it...I'm also facing this in JB enter image description here

Related