在我用livewirecomposer require livewire/livewire
并使用创建新的livewire component
php artisan make:livewire search
我一直收到错误Undefined type 'Livewire\Component'
<?php
namespace App\Http\Livewire;
use Livewire\Component;
class Search extends Component
{
public function render()
{
return view('livewire.search');
}
}
?>
你能帮帮我吗我到底做错了什么
1条答案
按热度按时间afdcj2ne1#
如文档(https://laravel-livewire.com/docs/2.x/quickstart)中所述:
使用以下命令将livewire导入布局:
https://laravel-livewire.com/