@ajax30 Thanks for providing the log file, that did help in finding the problem.
The first line of your error is:
2023-06-22 15:21:31] local.ERROR: Method Illuminate\View\View::__toString() must not throw an exception, caught Facade\Ignition\Exceptions\ViewException: Undefined variable: theme_directory (View: E:\wamp64\www\larablog\resources\views\themes\calvin\partials\comments-list.blade.php) {"userId":1,"exception":"[object] (Symfony\\Component\\ErrorHandler\\Error\\FatalError(code: 0): Method Illuminate\\View\\View::__toString() must not throw an exception, caught Facade\\Ignition\\Exceptions\\ViewException: Undefined variable: theme_directory (View: E:\\wamp64\\www\\larablog\
esources\\views\\themes\\calvin\\partials\\comments-list.blade.php) at E:\\wamp64\\www\\larablog\\app\\Http\\Controllers\\ArticlesController.php:0)
The important part from that is: Undefined variable: theme_directory (View: E:\wamp64\www\larablog\resources\views\themes\calvin\partials\comments-list.blade.php
In your blade file I see:
@auth
@include('themes/' . $theme_directory . '/partials/comment-form')
@endauth
I think you need to change something in this part:
$content .= view('themes/' . $this->theme_directory . '/partials/comments-list',
array_merge( $data, [
'is_infinitescroll' => $this->is_infinitescroll
])
);
My first idea should be:
$content .= view('themes/' . $this->theme_directory . '/partials/comments-list',
array_merge( $data, [
'is_infinitescroll' => $this->is_infinitescroll,
'theme_directory' => $this->theme_directory,
])
);
But maybe it should be part of data.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community