My resources/views/layouts/app.blade.php is
<!DOCTYPE html> <html lang="{{ str_replace('_', '-', app()->getLocale()) }}"> <head> <link rel="stylesheet" href="css/style.css"> </head> <body class="c-app"> @livewire('navigation-sidebar') <div class="c-wrapper c-fixed-components"> @livewire('navigation-menu') <div class="c-body"> {{ $slot }} </div> @livewireScripts </body> </html>
php artisan make:livewire Pages
Livewire render the Pages component into the {{ $slot }} via blade component resources/views/pages.blade.php
> <x-app-layout> > <div> > @livewire('pages') > </div> > </x-app-layout>
This setup is works good.
But with this approach, for each LiveWire component you have to create another blade component, this increases the number of files.
Is it possible to make only one blade component that will call all LiveWire components?