Your class has the wrong namespace
namespace App\Http\Livewire;
And change it back in the config file
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I am trying to implement livewire in my application, created a first component to see if it works but I only got Unable to find component error.
My project is in laravel sail
Used the documentation instalation process and created a the first component
php artisan make:livewire counter
This created this componet in app/Http/Livewire
<?php
namespace Http\Livewire;
use Livewire\Component;
class Counter extends Component
{
public function render()
{
return view('livewire.counter');
}
}
And This view in resources/views/livewire
<div>
<h1>Hi</h1>
</div>
I have tried @livewire('counter') and <livewire:counter /> to render
What have I tried or modified
'class_namespace' => 'App\Http\Livewire' changed to 'class_namespace' => 'Http\Livewire'
This modification created the components in app/Http/Livewire where the documentation says it should be but the error keep appearing.
php artisan livewire:discover and didn't work.@lozadakb Vanguard? Any reason you changed it from app?
Then it's
namespace Vanguard\Http\Livewire;
same in config
Please or to participate in this conversation.