Skip to content
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

✨Feature Request: Support ziggy 2.0 #588

Closed
xsjcTony opened this issue Feb 22, 2024 · 4 comments
Closed

✨Feature Request: Support ziggy 2.0 #588

xsjcTony opened this issue Feb 22, 2024 · 4 comments

Comments

@xsjcTony
Copy link

xsjcTony commented Feb 22, 2024

This is what's happening after upgarded to ziggy 2.0 in both Laravel and frontend.
Probably caused by the namespace change
https://github.com/tighten/ziggy/blob/2.x/UPGRADING.md#upgrading-from-1x-to-2x
image
image

@hamzaelmaghari
Copy link

hamzaelmaghari commented Feb 22, 2024

Hi @xsjcTony,
I see no issue here ziggy is a dependent composer package, check your code and find any ziggy declarations then correct the namespace manualy;

EX: in routes files if you're using routes as API, controllers if you're passing props to components instead of setting global @routes, stc...

@xsjcTony
Copy link
Author

I've searched through the whole project, seems all references to BladeRouteGenerator have the updated namespace. No idea why it is breaking, but if it's none of business here, yeah I'll close the issue.
image

@yaliv
Copy link

yaliv commented Mar 11, 2024

I got the same error and I'm not sure if I did something wrong.

Just solved the issue by running php artisan optimize:clear (see this comment).
AFAIK I don't use Laravel cache. It's my machine, not production 🤔

@xsjcTony
Copy link
Author

Yeah it's cache issue. I'm using Laravel + Vite with HMR, and as long as edit something in the app.blade.php with @route directive, it worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants