A JavaScript library that provides a Laravel-like route() helper for generating URLs from named Laravel routes in JavaScript.
Ziggy is a JavaScript library that provides a route() helper function matching Laravel's syntax, allowing developers to generate URLs for named Laravel routes directly in JavaScript. It solves the problem of maintaining consistent URLs between Laravel backend routes and JavaScript frontend code, eliminating manual URL construction and reducing errors.
Laravel developers building JavaScript frontends (Vue, React, or vanilla JS) who need to generate URLs that match their Laravel application's named routes.
Developers choose Ziggy because it provides a seamless, type-safe way to use Laravel routing in JavaScript with full support for route parameters, query strings, route-model binding, and framework integrations, reducing duplication and ensuring URL consistency.
Use your Laravel routes in JavaScript.
Ziggy's route() function exactly mirrors Laravel's helper, supporting parameters, query strings, and default values, as demonstrated in the README's extensive examples.
Automatically respects Laravel's route-model binding keys like 'slug' or custom keys when passing JavaScript objects, eliminating manual parameter extraction.
Includes Vue plugin and React hook for seamless use in modern frontends, with clear setup instructions in the README for both frameworks.
Offers full TypeScript definitions and an Artisan command to generate strict route name checking, enhancing developer experience with IDE support.
Allows filtering routes via config files or groups, enabling control over which routes are exposed to the frontend for security, as detailed in the Filtering Routes section.
Ziggy is useless outside Laravel ecosystems, making it a poor choice for multi-framework projects or those migrating away from Laravel.
For single-page applications or separate frontend repos, manual configuration is required to generate and import route files, adding steps compared to integrated solutions.
The @routes Blade directive outputs all named routes in HTML by default, risking unintended information leakage if not explicitly filtered, which the README warns about.
Changes to Laravel routes necessitate regenerating Ziggy's config, and without automated tooling like the provided Mix plugin, this can be a manual, error-prone process.
A full-stack framework for Laravel that takes the pain out of building dynamic UIs.
Debugbar for Laravel (Integrates PHP Debug Bar)
IDE Helper for Laravel
PHP Image Processing
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.