Closed m-h-saeedi closed 10 months ago
This looks like an issue with your route definitions, can you share the code of your HomeController::index
method?
Closing because I don't think this is a bug in Ziggy but feel free to share more info here or link to a reproduction and I'm happy to help debug some more!
just this
public function index()
{
return view('layouts.app');
}
and in blade is
@guest
<script>
window.loginUrl = '{!! route('login') !!}';
</script>
@else
@routes
<script>
//some code
</script>
@endguest
this is ok when i use v0.9.4 and when update to last version get error that mention in first
That looks fine. The exception message looks like you might have a route missing an argument or a name or with a broken controller method. Do you have a route named login
? Are you importing all your controller classes? Does this still happen after clearing your view and route cache?
yes I have login route and imported all controller classes and clear cache and route When I use version 0.9.4, it is completely the same, but when I update to the latest version or versions one, I get this problem.
It's one of your other routes causing an issue then. Is your app public so I can take a look? Or can you share a repo with a minimal reproduction of this issue?
I solved the problem One of the roots had a problem Thank you for your help
Ziggy version
1.8.1
Laravel version
10.32.0
Description
i use @route in my app.blade.php but i get this error
i also use this and not diffrent
Ziggy call and context
Ziggy configuration
Route definition