"View livewire not found":无法在我开发的包中呈现实时连线整页组件 Laravel。



我开发了一个包,当涉及到渲染正常视图时,它工作得很好,但现在我想渲染Full Page Livewire组件,我得到了一个"查看未找到消息";知道为什么吗?

例如,对于演出门票视图:

web.hp:

Route::get('tickets/list', ShowTickets::class);

服务提供商:

public function boot()
{
$this->loadMigrationsFrom(__DIR__ . "/database/migrations");
$this->loadRoutesFrom(__DIR__ . "/routes/web.php");
$this->loadViewsFrom(__DIR__ .'/resources/views', "Tickets");
Livewire::component('show-tickets', ShowTickets::class);
}

ShowTickets.hp:

<?php
namespace UHGroupTicketsAppLivewire;
use LivewireComponent;
use UHGroupTicketsAppModelsTicket;
class ShowTickets extends Component
{
public function mount()
{
$this->ticket = Ticket::where("archived_at", !null);
}
public function render()
{
$tickets = Ticket::all();
return view('Tickets::livewire.show-tickets', compact('tickets'));
}
}

我得到以下错误:

未找到视图[livewire.show tickets]。

尽管我的视图文件夹中的livewire文件夹中确实有一个show-tickets.blade.php文件。。。。

确保在config/app.php中正确添加了服务提供商?

最新更新