I am using livewire 2.2 with laravel 7.24 in my laravel project. When i load component using
Route::get('/path', ComponentClassPath);
it works, but when i load my livewire component inside a blade view. For instance, test.blade.php like this:
@extends('layouts.app')
@section('content')
@livewire("my-livewire-component")
@endsection
it doesn't work and shows the below error:
Undefined variable: slot (View: E:\xampp\htdocs\lw\resources\views\layouts\app.blade.php) .
app.blade.php
<head>
@livewireStyles
</head>
<body>
<div class="container">
{{ $slot }}
</div>
@livewireScripts
</body>
Any solution ?
ComponentClassPathtoo