-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
htmlspecialchars(): Argument #1 ($string) must be of type string, Closure given #117
Comments
Hey @simonjcarr, This is most likely caused by your component missing the You will therefore need to update your component to look like so and Volt which layout to use: <?php
use function Livewire\Volt\{layout, state};
layout('layouts.app');
?>
<div>
//
</div> |
@bensherred This is probably the case for this specific case, but it relates to any error you may get in any Volt file when routing with Solving this would be incredibly helpful for development. |
The mount method seems to be causing this issue, see the relevant discussion here. For me, changing the mount method to something else like boot gets rid of the error and makes debugging much easier. |
Volt file when routing with |
Volt Version
1.0
Laravel Version
11.9
PHP Version
8.3
Database Driver & Version
sqlite
Description
In a brand new app, when trying to access a volt full page component, I get the following error in browser.
Steps To Reproduce
In a brand new app created in Laravel Herd, I crate a basic component
This creates the following component
I create a route in web.php
I visit the route in my browser and get the error
Full Exception
The text was updated successfully, but these errors were encountered: