tighten / ziggy

Use your Laravel routes in JavaScript.
MIT License
3.91k stars 248 forks source link

Add extra manual for Vite/Inertia/Vue #689

Closed iwasherefirst2 closed 10 months ago

iwasherefirst2 commented 11 months ago

I had problems understanding the readme for the setup of Vite/Inertija/Vue. I found a lot of entries & blog post of people having difficulties. I think it makes sense to create a seperate document and slim down the Readme.md in the future.

What do you think?

bakerkretzmar commented 10 months ago

Thanks for the PR! I appreciate that this is a common issue and I'll revisit the Readme soon to see if I can make it simpler/clearer. For now I'm going to keep everything in one file.

iwasherefirst2 commented 10 months ago

Thank you for considering my PR and for your commitment to revisiting the Readme. I understand the decision to keep everything in one file for now.

I'd like to add a specific suggestion that might help clarify the setup process for others, especially those working with Vue/Inertia/Laravel. The current Inertia documentation references Ziggy for routing, but it's not immediately clear whether Ziggy's features are directly compatible with Inertia & Vue setups. This can be a bit confusing for new users.

For instance, in the installation section, it might be beneficial to explicitly state whether Ziggy works seamlessly with Inertia & Vue or if additional steps are required. Additionally, the section on JavaScript frameworks seems to suggest that we need to import the route() function without using @routes, which can be misleading for users who are not deeply familiar with these technologies.

Clearer distinctions and examples in these areas could significantly ease the learning curve for newcomers and reduce the potential for confusion. I believe these small adjustments in the documentation could make a substantial difference for developers integrating these technologies.

Thanks again for your work on this project, and I look forward to the updated Readme!

iwasherefirst2 commented 8 months ago

For those who look for instructions for Laravel, Vue.js, Inertia.js, I wrote a dedicated article: https://iwasherefirst2.medium.com/how-to-setup-ziggy-on-laravel-inertija-vite-vue-19385f50848e