// app/View/Components/DrivenLayout.php
<?php
namespace App\View\Components;
use Illuminate\View\Component;
use Illuminate\View\View;
class DrivenLayout extends Component
{
/**
* Get the view / contents that represents the component.
*/
public function render(): View
{
return view('layouts.driven');
}
}
1条答案
按热度按时间ioekq8ef1#
要以与
x-app-layout
相同的方式引用x-driven-layout
,除了现有的blade文件外,还需要在app/View/Components/DrivenLayout.php
中创建一个文件。