I get this Error ’ A Livewire component was not found’ when i deploy to my host, but when i’m working from my computer locally everything seem to work fine. use Laravel 8 with Jetstream and Livewire as my stack. The livewire version is 2.0
I created a compnent like this:
<?php
namespace App\Http\Livewire;
use Livewire\Component;
use App\Models\User;
use App\Models\Rtransaction;
use App\Models\Settings;
use Illuminate\Support\Facades\Auth;
class Receive extends Component
{
public $currency;
public $hash;
public $address;
protected $listeners = ['changecurr' => 'ShowCurrencyAddress'];
protected $rules = [
'hash' => 'required',
];
public function mount()
{
$settings = Settings::where('id', '1')->first();
$this->currency = 'BTC';
$this->address = $settings->btcWallet;
}
public function render()
{
return view('livewire.receive');
}
public function save()
{
$this->validate();
sleep(2);
$dp=new Rtransaction();
$dp->amount="0";
$dp->status= 'Pending';
$dp->orderID= $this->hash;
$dp->proof= $this->currency;
$dp->type="Recieve";
$dp->description="Received 0 $this->currency";
$dp->user= Auth::User()->id;
$dp->save();
session()->flash('success', 'Successful, Please wait for confirmation.');
$this->reset();
}
}
and in my livewire view i have it inside my livewire folder and a file called recieve.blade.php
i.e livewire/recieve.blade.php
everything seem to work fine in my localhost, but when i deploy online i get this error