tightenco/ziggy
Use your Laravel named routes in JavaScript.
v2.6.4
53M downloads/mo
#420 most downloaded on Packagist
tighten/ziggy
What this package is like to depend on
Last release 5 days ago
18 Aug 2026
Release timing varies
gaps range from 8 days to 5 months
Most releases are documented
notes for 57 of 87 stable releases
Nothing withdrawn
no release was ever pulled
9 years old
95 releases · first in 2017
5 releases in the last 12 months
see the full history below
Release timeline
95 releases · Aug 2017 to Aug 2026Releases
latest 60 of 95-
v2.6.418 Aug 2026Release notes
Open source →What's Changed
- Fix intellisense/completions for partial route parameter objects by @bakerkretzmar in #880
- Check if model has table or route key attribute to determine bindings by @bram-pkg in #894
Full Changelog: v2.6.3...v2.6.4
Release notes
Open source →Fixed
- Fix intellisense/completions for partial route parameter objects by @bakerkretzmar in https://github.com/tighten/ziggy/pull/880
- Check if model has table or route key attribute to determine bindings by @bram-pkg in https://github.com/tighten/ziggy/pull/894
-
v2.6.323 Jun 2026Release notes
Open source →What's Changed
- Fix TypeError when optional params omitted from array (fixes #736) by @pataar in #878
- Brand RouteUrl type to distinguish it from plain strings by @pataar in #877
- Test on Laravel 13 by @bakerkretzmar in #874
- Docs: Update PHP_CodeSniffer repository link by @rodrigoprimo in #881
- Create the directory for a custom types path if it doesn't exist by @lazerg in #888
New Contributors
- @rodrigoprimo made their first contribution in #881
- @lazerg made their first contribution in #888
Full Changelog: v2.6.2...v2.6.3
Release notes
Open source →Fixed
- Fix TypeError when optional params omitted from array (fixes #736) by @pataar in https://github.com/tighten/ziggy/pull/878
- Docs: Update PHP_CodeSniffer repository link by @rodrigoprimo in https://github.com/tighten/ziggy/pull/881
- Create the directory for a custom types path if it doesn't exist by @lazerg in https://github.com/tighten/ziggy/pull/888
Changed
- Brand RouteUrl type to distinguish it from plain strings by @pataar in https://github.com/tighten/ziggy/pull/877
- Test on Laravel 13 by @bakerkretzmar in https://github.com/tighten/ziggy/pull/874
-
v2.6.205 Mar 2026Release notes
Open source →What's Changed
- Fix shared route bindings mutation in _substituteBindings by @pataar in #875
- fix: handle falsy parameter values in _parse by @pataar in #876
Full Changelog: v2.6.1...v2.6.2
Release notes
Open source →Fixed
- Fix shared route bindings mutation in _substituteBindings by @pataar in https://github.com/tighten/ziggy/pull/875
- fix: handle falsy parameter values in _parse by @pataar in https://github.com/tighten/ziggy/pull/876
-
v2.6.116 Feb 2026Release notes
Open source →What's Changed
- Allow specifying the name of the typescript declaration file by @bakerkretzmar in #872
Full Changelog: v2.6.0...v2.6.1
Release notes
Open source →Changed
- Allow specifying the name of the typescript declaration file by @bakerkretzmar in https://github.com/tighten/ziggy/pull/872
-
v2.6.015 Sep 2025Release notes
Open source →What's Changed
- Support route model binding and interfaces by @christian98 in #854
- feat(typescript): add branded type for creating routes by @pataar in #862
- Add JSON option to
@routesfor improved CSP compatibility by @flexponsive in #831 - Replace
qsby @benmccann in #846 - Fix current checks with encoded
#in URL by @bakerkretzmar in #863
New Contributors
- @christian98 made their first contribution in #854
- @pataar made their first contribution in #862
- @flexponsive made their first contribution in #831
- @benmccann made their first contribution in #846
Full Changelog: v2.5.3...v2.6.0
Release notes
Open source →Added
- Support route model binding and interfaces by @christian98 in https://github.com/tighten/ziggy/pull/854
- feat(typescript): add branded type for creating routes by @pataar in https://github.com/tighten/ziggy/pull/862
- Add JSON option to
@routesfor improved CSP compatibility by @flexponsive in https://github.com/tighten/ziggy/pull/831
Fixed
- Fix current checks with encoded
#in URL by @bakerkretzmar in https://github.com/tighten/ziggy/pull/863
Changed
- Replace
qsby @benmccann in https://github.com/tighten/ziggy/pull/846
-
v2.5.317 May 2025Release notes
Open source →What's Changed
- fix type hinting for PHP 8.4 by @bodny in #816
- Fix checking current route in strict mode by @bakerkretzmar in #840
New Contributors
Full Changelog: v2.5.2...v2.5.3
Release notes
Open source →Fixed
- Fix type hinting for PHP 8.4 by @bodny in https://github.com/tighten/ziggy/pull/816
- Fix checking current route in strict mode by @bakerkretzmar in https://github.com/tighten/ziggy/pull/840
-
v2.5.227 Feb 2025Release notes
Open source →What's Changed
- Test on Laravel 12 by @shuvroroy in #820
- Update extendability of
Types.phpby @rrmesquita in #821
New Contributors
- @rrmesquita made their first contribution in #821
Full Changelog: v2.5.1...v2.5.2
Release notes
Open source →Changed
- Test on Laravel 12 by @shuvroroy in https://github.com/tighten/ziggy/pull/820
- Update extendability of
Types.phpby @rrmesquita in https://github.com/tighten/ziggy/pull/821
-
v2.5.131 Jan 2025Release notes
Open source →What's Changed
- Fix
current()type in strict mode by @bakerkretzmar in #809
Full Changelog: v2.5.0...v2.5.1
Release notes
Open source →Fixed
- Fix
current()type in strict mode by @bakerkretzmar in https://github.com/tighten/ziggy/pull/809
- Fix
-
v2.5.023 Jan 2025Release notes
Open source →What's Changed
- feat: support passing except/only args to ziggy command by @joshmanders in #805
- Redefine
ParsedQstype by @bakerkretzmar in #806 - Only limit route names when calling route() by @simon-tma in #790
New Contributors
- @joshmanders made their first contribution in #805
Full Changelog: v2.4.2...v2.5.0
Release notes
Open source →Added
- Support passing except/only args to ziggy command by @joshmanders in https://github.com/tighten/ziggy/pull/805
Fixed
- Redefine
ParsedQstype by @bakerkretzmar in https://github.com/tighten/ziggy/pull/806 - Only limit route names when calling route() by @simon-tma in https://github.com/tighten/ziggy/pull/790
-
v2.4.202 Jan 2025Release notes
Open source →What's Changed
- Fix deprecated implictly nullable parameter by @datlechin in #792
New Contributors
- @datlechin made their first contribution in #792
Full Changelog: v2.4.1...v2.4.2
Release notes
Open source →Fixed
- Fix deprecated implictly nullable parameter by @datlechin in https://github.com/tighten/ziggy/pull/792
-
v2.4.121 Nov 2024 -
v2.4.009 Nov 2024Release notes
Open source →Added
- Add ability to strictly type check route names by @bakerkretzmar and @Andyuu in https://github.com/tighten/ziggy/pull/787
Fixed
- Fix type definition for route() with only options by @bram-pkg in https://github.com/tighten/ziggy/pull/786
- Fix
queryParamsreturn type by @bakerkretzmar in https://github.com/tighten/ziggy/pull/788
Changed
- Add note to use inject for vue 3 by @mhelaiwa in https://github.com/tighten/ziggy/pull/785
- Update
README.md. by @choowx in https://github.com/tighten/ziggy/pull/782
-
v2.3.117 Oct 2024Release notes
Open source →Fixed
- Escape special regex characters when matching routes by @aguingand in https://github.com/tighten/ziggy/pull/766
- Fix params sometimes being double-decoded by @bakerkretzmar in https://github.com/tighten/ziggy/pull/778
Changed
- Optimize has() by @thomas-brx in https://github.com/tighten/ziggy/pull/770
-
v2.3.021 Jul 2024Release notes
Open source →Added
- Add ability to acess only the query params or the actual route params by @peter-emad99 in https://github.com/tighten/ziggy/pull/744
Changed
- Pest by @bakerkretzmar in https://github.com/tighten/ziggy/pull/756
- Laravel route change by @hasanablak in https://github.com/tighten/ziggy/pull/763
- Modernize some PHP syntax by @bakerkretzmar in https://github.com/tighten/ziggy/pull/757
-
v2.2.116 May 2024Release notes
Open source →Fixed
- Fix double slashes with domain params by @bakerkretzmar in https://github.com/tighten/ziggy/pull/754
-
v2.2.016 May 2024Release notes
Open source →Added
- Support Laravel Folio by @bakerkretzmar in https://github.com/tighten/ziggy/pull/733
Fixed
- Fix route().params type by @peter-emad99 in https://github.com/tighten/ziggy/pull/743
-
v2.1.026 Mar 2024Release notes
Open source →Added
- Improve generated types to include optional types by @alexmccabe in https://github.com/tighten/ziggy/pull/697
Fixed
- Fix Vue plugin on Vue 2 by @bakerkretzmar in https://github.com/tighten/ziggy/pull/738
-
v2.0.519 Mar 2024Release notes
Open source →Fixed
- Export the types file by @simon-tma in https://github.com/tighten/ziggy/pull/721
-
v2.0.405 Mar 2024Release notes
Open source →Fixed
- Fix event listener propagation by @bakerkretzmar in https://github.com/tighten/ziggy/pull/724
-
v2.0.321 Feb 2024Release notes
Open source →Fixed
- Add Vue plugin and React hook types by @bakerkretzmar in https://github.com/tighten/ziggy/pull/715
-
v2.0.220 Feb 2024Release notes
Open source →Fixed
- Fix package.json module and exports by @bakerkretzmar in https://github.com/tighten/ziggy/pull/714
-
v2.0.120 Feb 2024Release notes
Open source →Fixed
- Remove default export from type declarations by @bakerkretzmar in https://github.com/tighten/ziggy/pull/713
-
v2.0.020 Feb 2024Release notes
Open source →See UPGRADING for detailed upgrade instructions.
Changed
- Changed PHP package namespace from
Tightenco\ZiggytoTighten\Ziggy. - Updated JavaScript package to only provide named exports.
- Moved Vue and React integrations to root of JavaScript module.
- Updated builds to only use ES Modules.
- Updated minimum dependency versions to Laravel 9 and PHP 8.1.
Removed
- Made
makeDirectorymethod ofCommandRouteGeneratorclass private. - Removed deprecated JavaScript
check()method.
- Changed PHP package namespace from
-
v2.0.0-beta.216 Dec 2023 pre-releaseNothing published for this version
-
v2.0.0-beta.102 Nov 2023 pre-releaseNothing published for this version
-
v1.8.220 Feb 2024Release notes
Open source →Added
- Test on Laravel 11 by @shuvroroy in https://github.com/tighten/ziggy/pull/709
Fixed
- Fix
route().current()with encoded characters by @bakerkretzmar in https://github.com/tighten/ziggy/pull/668 - Fix retrieving ziggys config from an api endpoint link in readme by @RomainMazB in https://github.com/tighten/ziggy/pull/694
- Fix
route().current()with nested/object query params by @bakerkretzmar in https://github.com/tighten/ziggy/pull/712
Changed
- Enable provenance for npm package by @saibotk in https://github.com/tighten/ziggy/pull/684
- Handle generated file extensions more robustly by @bakerkretzmar in https://github.com/tighten/ziggy/pull/687
-
v1.8.112 Oct 2023Release notes
Open source →Fixed
- Update: Correction of some spellings and articles in the Readme file. by @prince-noman in https://github.com/tighten/ziggy/pull/678
- Fix
route().current()with encoded characters by @bakerkretzmar in https://github.com/tighten/ziggy/pull/668
Changed
- Update Readme, formatting, and testing setup by @bakerkretzmar in https://github.com/tighten/ziggy/pull/675
-
v1.8.006 Oct 2023Release notes
Open source →Added
- Add type declarations and
ziggy.d.tsgeneration by @lmeysel and @bakerkretzmar in https://github.com/tighten/ziggy/pull/664
- Add type declarations and
-
v1.7.204 Oct 2023Nothing published for this version
-
v1.7.104 Oct 2023Nothing published for this version
-
v1.7.004 Oct 2023Release notes
Open source →Added
- Add
useRoute()React hook by @bakerkretzmar in https://github.com/tighten/ziggy/pull/473
Fixed
- URL-encode fewer special characters inside in route parameters by @bakerkretzmar in https://github.com/tighten/ziggy/pull/662
- Fix empty root URL with
absolute: falseby @bakerkretzmar in https://github.com/tighten/ziggy/pull/667
- Add
-
v1.6.218 Aug 2023Release notes
Open source →Fixed
- Make slash "not encoding" less restrictive by @aguingand in https://github.com/tighten/ziggy/pull/661
-
v1.6.104 Aug 2023Release notes
Open source →Fixed
- Fix numeric route names by @bakerkretzmar https://github.com/tighten/ziggy/pull/658
-
v1.6.012 May 2023Release notes
Open source →Added
- Add
'ziggy.output.path'config option by @mhelaiwa https://github.com/tighten/ziggy/pull/633
- Add
-
v1.5.205 May 2023Release notes
Open source →Added
- Add Vite instructions to README.md by @fullstackfool https://github.com/tighten/ziggy/pull/627
Fixed
- Trim slashes between origin and optional first param by @bakerkretzmar in https://github.com/tighten/ziggy/pull/637
- Fix
route().paramsnot being decoded by @Tofandel in https://github.com/tighten/ziggy/pull/610
-
v1.5.122 Apr 2023Release notes
Open source →Fixed
- Check for overridden
getKeyName()and$primaryKeyby @Jared0430 in https://github.com/tighten/ziggy/pull/630
- Check for overridden
-
v1.5.023 Sep 2022Release notes
Open source →Added
- Add support for negating route filter patterns with
!by @bakerkretzmar in https://github.com/tighten/ziggy/pull/559
Changed
- Test on PHP 8.2 by @bakerkretzmar in https://github.com/tighten/ziggy/pull/584
Fixed
- Allow
nullas entire params argument by @bakerkretzmar in https://github.com/tighten/ziggy/pull/582
- Add support for negating route filter patterns with
-
v1.4.608 Apr 2022Release notes
Open source →Fixed
- Use global regex instead of
replaceAllfor better browser support by @bakerkretzmar in https://github.com/tighten/ziggy/pulls/548
- Use global regex instead of
-
v1.4.525 Mar 2022Release notes
Open source →Fixed
- Remove dead code by @Tofandel in https://github.com/tighten/ziggy/pull/525
- Fix
route().current()with 'wheres' that include regex start/end anchors by @bakerkretzmar in https://github.com/tighten/ziggy/pull/535 - Fix inherited custom route key name detection by @bakerkretzmar in https://github.com/tighten/ziggy/pull/540
-
v1.4.411 Mar 2022Release notes
Open source →Added
- Allow custom output via formatters by @jaulz in https://github.com/tighten/ziggy/pull/483
- Add Vue 3
provide/injectsupport to the Vue plugin by @c-fitzmaurice in https://github.com/tighten/ziggy/pull/518
Fixed
- Encode non-slash characters in wildcard last parameter by @rodrigopedra in https://github.com/tighten/ziggy/pull/507
- Update JS route matching to take 'wheres' into account by @Tofandel in https://github.com/tighten/ziggy/pull/514
-
v1.4.328 Jan 2022Release notes
Open source →Added
- Test on PHP 8.1 by @bakerkretzmar in https://github.com/tighten/ziggy/pull/484
- Don't encode slashes in wildcard last parameter by @bakerkretzmar in https://github.com/tighten/ziggy/pull/500
Fixed
- Ignore route action parameters without URI segments by @jaulz in https://github.com/tighten/ziggy/pull/482
-
v1.4.201 Oct 2021Release notes
Open source →Fixed
- Fix
route().current()matching route names with multiple periods (#466)
- Fix
-
v1.4.124 Sep 2021 -
v1.4.025 Aug 2021 -
v1.3.625 Aug 2021 -
v1.3.520 Jul 2021 -
v1.3.406 Jul 2021 -
v1.3.302 Jul 2021 -
v1.3.201 Jul 2021Release notes
Open source →Fixed
- Remove Babel preset to correctly transpile to ES5 by default (d781b16)
-
v1.3.119 Jun 2021 -
v1.3.018 Jun 2021 -
v1.2.024 May 2021 -
v1.1.002 Apr 2021 -
v1.0.505 Feb 2021Release notes
Open source →Added
- Add support for appending 'extra' parameters to the query string (#390)
Changed
- Remove source maps (#395)
Fixed
- Use Laravel's
Reflectorclass to get model parameter class name (#396)
-
v1.0.406 Dec 2020 -
v1.0.321 Nov 2020 -
v1.0.213 Nov 2020 -
v1.0.110 Nov 2020 -
v1.0.006 Nov 2020Release notes
Open source →Added
- Document the
check()method (#294) and how to install and use Ziggy vianpmand over a CDN (#299) - Add support for custom scoped route model binding, e.g.
/users/{user}/posts/{post:slug}(#307) - Add support for implicit route model binding (#315)
- Add support for passing parameters to
current()to check against the current URL in addition to the route name (#330)
Changed
- ⚠️ Update
ziggy:generateoutput path for Laravel 5.7+resourcesdirectory structure, thanks @Somethingideally! (#269) - ⚠️ Update automatic
idparameter detection to check for higher priority named route parameters and allow passingidas a query parameter (#301) - ⚠️ Rename the
RoutePayloadclass toZiggyand remove itscompilemethod in favour of constructing a new instance and calling->toArray()or->toJson()(#305)- Resolve the application router instance internally instead of passing it into the constructor –
new Ziggy(...)now takes only 2 arguments,$groupand$url - Change the default value of
basePortfromfalsetonull - Remove the
getRoutePayload()methods on theBladeRouteGeneratorandCommandRouteGeneratorclasses
- Resolve the application router instance internally instead of passing it into the constructor –
- ⚠️ Rename all
whitelistandblacklistfunctionality toonlyandexcept(#300) - Use Jest instead of Mocha for JS tests (#309)
- Use microbundle instead of Webpack to build and distribute Ziggy (#312)
- ⚠️ Default Ziggy's
baseUrlto the value of theAPP_URLenvironment variable instead ofurl('/')(#334) - ⚠️ Return a literal string from the
route()function when any arguments are passed to it (#336) - ⚠️ Rename
namedRoutes→routes,defaultParameters→defaults,baseUrl→url, andbasePort→port(#338) - ⚠️ Make the
filter()method on theZiggyclass return an instance of that class instead of a collection of routes (#341) - ⚠️ Make the
nameKeyedRoutes(),resolveBindings(),applyFilters(), andgroup()methods on theZiggyclass, and thegenerate()method on theCommandRouteGeneratorclass, private (#341) - ⚠️ Export from
index.jsinstead ofroute.js(#344) - ⚠️ Encode boolean query parameters as integers (#345)
- ⚠️ Ensure
.current()respects the value of theabsoluteoption (#353)
Deprecated
- Deprecate the
with()andcheck()methods (#330)
Removed
- ⚠️ Remove
RouteFacade macrosRoute::only()andRoute::except()(previouslyRoute::whitelist()andRoute::blacklist()) (#306) - ⚠️ Remove the following undocumented public properties and methods from the
Routerclass returned by theroute()function (#330):name,absolute,ziggy,urlBuilder,template,urlParams,queryParams, andhydratednormalizeParams(),hydrateUrl(),matchUrl(),constructQuery(),extractParams(),parse(), andtrimParam()
- ⚠️ Remove the
UrlBuilderclass (#330) - ⚠️ Remove the
url()method now thatroute(...)returns a string (#336) - ⚠️ Remove the
baseDomainandbaseProtocolproperties on the Ziggy config object (#337) - ⚠️ Remove the
appendRouteToList(),isListedAs(),except(), andonly()methods from theZiggyclass (#341)
Fixed
- Fix automatic
idparameter detection by also excluding routes with an optionalidparameter ({id?}), thanks @Livijn! (#263) - Fix port not being added to URL for routes with subdomains (#293)
- Fix getting parameters of routes in apps installed in subfolders (#302)
- Ensure fallback routes are always last, thanks @davejamesmiller! (#310)
- Allow getting the route name with
current()when the current URL has a query string (#330)
- Document the
-
v1.0.0-beta.606 Nov 2020 pre-releaseNothing published for this version