Method App\Http\Livewire\Twofa::getRenderHookScopes does not exist.
So I had a 2fa system setup and working, and wondering if a recent composer update has pulled some changes that is now causing this error. I cant find any reference to me calling getRenderHookScopes so not sure where its going wrong
1 Reply
This is my component
And my view:
Could anything from a recent update have caused this?
<x-filament-panels::layout.base :livewire="$livewire">
I think its this part specifically
<?php
namespace App\Http\Livewire;
use Livewire\Component;
class Twofa extends Component
{
protected $title = 'Two Factor Authentication';
protected ?string $heading = null;
public function getTitle()
{
return $this->title;
}
public function getHeading()
{
return 'Two Factor Authentication';
}
public function getSubHeading()
{
return null;
}
public function render()
{
return view('livewire.twofa');
}
}
<?php
namespace App\Http\Livewire;
use Livewire\Component;
class Twofa extends Component
{
protected $title = 'Two Factor Authentication';
protected ?string $heading = null;
public function getTitle()
{
return $this->title;
}
public function getHeading()
{
return 'Two Factor Authentication';
}
public function getSubHeading()
{
return null;
}
public function render()
{
return view('livewire.twofa');
}
}
@php
$livewire = new \App\Http\Livewire\Twofa();
@endphp
<div class="fi-simple-layout flex min-h-screen flex-col items-center">
<div class="fi-simple-main-ctn flex w-full flex-grow items-center justify-center">
<main
class="fi-simple-main my-16 w-full bg-white px-6 py-12 shadow-sm ring-1 ring-gray-950/5 dark:bg-gray-900 dark:ring-white/10 sm:rounded-xl sm:px-12 sm:max-w-lg">
<x-filament-panels::layout.base :livewire="$livewire">
<x-filament-panels::header.simple :heading="$heading ??= $livewire->getHeading()"
:subheading="$subheading ??= $livewire->getSubHeading()" />
{{-- Content --}}
<x-filament-panels::form action="{{ $form->getAction() }}" method="POST" style="margin-top: 5%;">
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
@if (isset($form) && $form->getMethodOption() == "select")
<x-filament-forms::field-wrapper.label prefix="Choose Method" />
<x-filament::input.wrapper>
<x-filament::input.select id="choose-method" name="method">
<option value="" selected disabled>Choose Method</option>
@foreach ($form->getList() as $item)
<option value="{{ $item }}">{{ $item }}</option>
@endforeach
</x-filament::input.select>
</x-filament::input.wrapper>
@php
$livewire = new \App\Http\Livewire\Twofa();
@endphp
<div class="fi-simple-layout flex min-h-screen flex-col items-center">
<div class="fi-simple-main-ctn flex w-full flex-grow items-center justify-center">
<main
class="fi-simple-main my-16 w-full bg-white px-6 py-12 shadow-sm ring-1 ring-gray-950/5 dark:bg-gray-900 dark:ring-white/10 sm:rounded-xl sm:px-12 sm:max-w-lg">
<x-filament-panels::layout.base :livewire="$livewire">
<x-filament-panels::header.simple :heading="$heading ??= $livewire->getHeading()"
:subheading="$subheading ??= $livewire->getSubHeading()" />
{{-- Content --}}
<x-filament-panels::form action="{{ $form->getAction() }}" method="POST" style="margin-top: 5%;">
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
@if (isset($form) && $form->getMethodOption() == "select")
<x-filament-forms::field-wrapper.label prefix="Choose Method" />
<x-filament::input.wrapper>
<x-filament::input.select id="choose-method" name="method">
<option value="" selected disabled>Choose Method</option>
@foreach ($form->getList() as $item)
<option value="{{ $item }}">{{ $item }}</option>
@endforeach
</x-filament::input.select>
</x-filament::input.wrapper>
@else
<x-filament-forms::field-wrapper.label prefix="Code" />
<x-filament::input.wrapper>
<x-filament::input type="text" name="code" placeholder="Enter Code" id="code" />
</x-filament::input.wrapper>
@endif
<x-filament::button type="submit" color="primary">
Submit
</x-filament::button>
</x-filament-panels::form>
</x-filament-panels::layout.base>
</main>
</div>
</div>
@else
<x-filament-forms::field-wrapper.label prefix="Code" />
<x-filament::input.wrapper>
<x-filament::input type="text" name="code" placeholder="Enter Code" id="code" />
</x-filament::input.wrapper>
@endif
<x-filament::button type="submit" color="primary">
Submit
</x-filament::button>
</x-filament-panels::form>
</x-filament-panels::layout.base>
</main>
</div>
</div>