All notable changes to this project will be documented in this file.
This project adheres to Semantic Versioning, and the format of this changelog is based on Keep a Changelog.
Breaking changes are marked with
v2.6.2 - 2026-03-05
Fixed
- Fix shared route bindings mutation in _substituteBindings by @pataar in #875
- fix: handle falsy parameter values in _parse by @pataar in #876
v2.6.1 - 2026-02-16
Changed
- Allow specifying the name of the typescript declaration file by @bakerkretzmar in #872
v2.6.0 - 2025-09-14
Added
- 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
Fixed
- Fix current checks with encoded
#in URL by @bakerkretzmar in #863
Changed
- Replace
qsby @benmccann in #846
v2.5.3 - 2025-05-17
Fixed
- Fix type hinting for PHP 8.4 by @bodny in #816
- Fix checking current route in strict mode by @bakerkretzmar in #840
v2.5.2 - 2025-02-27
Changed
v2.5.1 - 2025-01-31
Fixed
- Fix
current()type in strict mode by @bakerkretzmar in #809
v2.5.0 - 2025-01-22
Added
- Support passing except/only args to ziggy command by @joshmanders in #805
Fixed
- Redefine
ParsedQstype by @bakerkretzmar in #806 - Only limit route names when calling route() by @simon-tma in #790
v2.4.2 - 2025-01-02
Fixed
- Fix deprecated implictly nullable parameter by @datlechin in #792
v2.4.1 - 2024-11-21
Fixed
- Fix
qstype dependencies
v2.4.0 - 2024-11-09
Added
- Add ability to strictly type check route names by @bakerkretzmar and @Andyuu in #787
Fixed
- Fix type definition for route() with only options by @bram-pkg in #786
- Fix
queryParamsreturn type by @bakerkretzmar in #788
Changed
v2.3.1 - 2024-10-17
Fixed
- Escape special regex characters when matching routes by @aguingand in #766
- Fix params sometimes being double-decoded by @bakerkretzmar in #778
Changed
- Optimize has() by @thomas-brx in #770
v2.3.0 - 2024-07-21
Added
- Add ability to acess only the query params or the actual route params by @peter-emad99 in #744
Changed
- Pest by @bakerkretzmar in #756
- Laravel route change by @hasanablak in #763
- Modernize some PHP syntax by @bakerkretzmar in #757
v2.2.1 - 2024-05-16
Fixed
- Fix double slashes with domain params by @bakerkretzmar in #754
v2.2.0 - 2024-05-16
Added
- Support Laravel Folio by @bakerkretzmar in #733
Fixed
- Fix route().params type by @peter-emad99 in #743
v2.1.0 - 2024-03-26
Added
- Improve generated types to include optional types by @alexmccabe in #697
Fixed
- Fix Vue plugin on Vue 2 by @bakerkretzmar in #738
v2.0.5 - 2024-03-19
Fixed
- Export the types file by @simon-tma in #721
v2.0.4 - 2024-03-05
Fixed
- Fix event listener propagation by @bakerkretzmar in #724
v2.0.3 - 2024-02-20
Fixed
- Add Vue plugin and React hook types by @bakerkretzmar in #715
v2.0.2 - 2024-02-20
Fixed
- Fix package.json module and exports by @bakerkretzmar in #714
v2.0.1 - 2024-02-20
Fixed
- Remove default export from type declarations by @bakerkretzmar in #713
v2.0.0 - 2024-02-20
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.
v1.8.2 - 2024-02-20
Added
- Test on Laravel 11 by @shuvroroy in #709
Fixed
- Fix
route().current()with encoded characters by @bakerkretzmar in #668 - Fix retrieving ziggys config from an api endpoint link in readme by @RomainMazB in #694
- Fix
route().current()with nested/object query params by @bakerkretzmar in #712
Changed
- Enable provenance for npm package by @saibotk in #684
- Handle generated file extensions more robustly by @bakerkretzmar in #687
v1.8.1 - 2023-10-12
Fixed
- Update: Correction of some spellings and articles in the Readme file. by @prince-noman in #678
- Fix
route().current()with encoded characters by @bakerkretzmar in #668
Changed
- Update Readme, formatting, and testing setup by @bakerkretzmar in #675
v1.8.0 - 2023-10-06
Added
- Add type declarations and
ziggy.d.tsgeneration by @lmeysel and @bakerkretzmar in #664
v1.7.0 - 2023-10-04
Added
- Add
useRoute()React hook by @bakerkretzmar in #473
Fixed
- URL-encode fewer special characters inside in route parameters by @bakerkretzmar in #662
- Fix empty root URL with
absolute: falseby @bakerkretzmar in #667
v1.6.2 - 2023-08-18
Fixed
- Make slash "not encoding" less restrictive by @aguingand in #661
v1.6.1 - 2023-08-04
Fixed
- Fix numeric route names by @bakerkretzmar #658
v1.6.0 - 2023-05-12
Added
- Add
'ziggy.output.path'config option by @mhelaiwa #633
v1.5.2 - 2023-05-05
Added
- Add Vite instructions to README.md by @fullstackfool #627
Fixed
- Trim slashes between origin and optional first param by @bakerkretzmar in #637
- Fix
route().paramsnot being decoded by @Tofandel in #610
v1.5.1 - 2023-04-22
Fixed
- Check for overridden
getKeyName()and$primaryKeyby @Jared0430 in #630
v1.5.0 - 2022-09-23
Added
- Add support for negating route filter patterns with
!by @bakerkretzmar in #559
Changed
- Test on PHP 8.2 by @bakerkretzmar in #584
Fixed
- Allow
nullas entire params argument by @bakerkretzmar in #582
v1.4.6 - 2022-04-08
Fixed
- Use global regex instead of
replaceAllfor better browser support by @bakerkretzmar in https://github.com/tighten/ziggy/pulls/548
v1.4.5 - 2022-03-25
Fixed
- Remove dead code by @Tofandel in #525
- Fix
route().current()with 'wheres' that include regex start/end anchors by @bakerkretzmar in #535 - Fix inherited custom route key name detection by @bakerkretzmar in #540
v1.4.4 - 2022-03-11
Added
- Allow custom output via formatters by @jaulz in #483
- Add Vue 3
provide/injectsupport to the Vue plugin by @c-fitzmaurice in #518
Fixed
- Encode non-slash characters in wildcard last parameter by @rodrigopedra in #507
- Update JS route matching to take 'wheres' into account by @Tofandel in #514
v1.4.3 - 2022-01-28
Added
- Test on PHP 8.1 by @bakerkretzmar in #484
- Don't encode slashes in wildcard last parameter by @bakerkretzmar in #500
Fixed
- Ignore route action parameters without URI segments by @jaulz in #482
v1.4.2 - 2021-10-01
Fixed
- Fix
route().current()matching route names with multiple periods (#466)
v1.4.1 - 2021-09-24
Fixed
- Fix
undefinederror if there's no globalZiggyvariable (#462) - Fix payload caching for Octane (#460)
v1.4.0 - 2021-08-25
Added
- Add support for parameters inside single route segments (#444)
v1.3.6 - 2021-08-25
Fixed
- Fix nested object query params (#451)
v1.3.5 - 2021-07-20
Fixed
- Fix route model binding with abstract class (#445)
v1.3.4 - 2021-07-06
Fixed
- Fix property mangling and implement ES5 compatibility (#442)
v1.3.3 - 2021-07-02
Fixed
- Revert (d781b16)
v1.3.2 - 2021-07-01
Fixed
- Remove Babel preset to correctly transpile to ES5 by default (d781b16)
v1.3.1 - 2021-06-19
Changed
- Use
Object.assign()to merge routes (#429)
v1.3.0 - 2021-06-17
Added
- Make
locationconfigurable (adds better support for SSR) (#432)
v1.2.0 - 2021-05-24
Added
v1.1.0 - 2021-04-02
Added
- Prepare for Laravel Octane (#415)
v1.0.5 - 2021-02-05
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.4 - 2020-12-06
Fixed
- Fix bug where
route().current()could incorrectly returntrueon URLs with no parameters (#377) - Fix several other bugs in
route().current()with params (#379) - Revert #334, default Ziggy's
urlback tourl('/')instead of theAPP_URLenvironment variable (#386)
v1.0.3 - 2020-11-20
Fixed
- Filter out unnamed cached routes with randomly generated names (#370)
- Fix collision with JavaScript built-in method names like
shiftby casting emptydefaultsto an object (#371)
v1.0.2 - 2020-11-13
Fixed
- Make
ziggy:generateURL behaviour consistent with Ziggy class and Blade directive (#361) - Fix
route().current()error on unknown/unnamed routes (#362)
v1.0.1 - 2020-11-10
Fixed
- Fix
route().current()on routes at the domain root (#356)
v1.0.0 - 2020-11-06
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
⚠️ Updateziggy:generateoutput path for Laravel 5.7+resourcesdirectory structure, thanks @Somethingideally! (#269)⚠️ Update automaticidparameter detection to check for higher priority named route parameters and allow passingidas a query parameter (#301)⚠️ Rename theRoutePayloadclass 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 allwhitelistandblacklistfunctionality toonlyandexcept(#300)- Use Jest instead of Mocha for JS tests (#309)
- Use microbundle instead of Webpack to build and distribute Ziggy (#312)
⚠️ Default Ziggy'sbaseUrlto the value of theAPP_URLenvironment variable instead ofurl('/')(#334)⚠️ Return a literal string from theroute()function when any arguments are passed to it (#336)⚠️ RenamenamedRoutes→routes,defaultParameters→defaults,baseUrl→url, andbasePort→port(#338)⚠️ Make thefilter()method on theZiggyclass return an instance of that class instead of a collection of routes (#341)⚠️ Make thenameKeyedRoutes(),resolveBindings(),applyFilters(), andgroup()methods on theZiggyclass, and thegenerate()method on theCommandRouteGeneratorclass, private (#341)⚠️ Export fromindex.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
⚠️ RemoveRouteFacade macrosRoute::only()andRoute::except()(previouslyRoute::whitelist()andRoute::blacklist()) (#306)⚠️ Remove the following undocumented public properties and methods from theRouterclass returned by theroute()function (#330):name,absolute,ziggy,urlBuilder,template,urlParams,queryParams, andhydratednormalizeParams(),hydrateUrl(),matchUrl(),constructQuery(),extractParams(),parse(), andtrimParam()
⚠️ Remove theUrlBuilderclass (#330)⚠️ Remove theurl()method now thatroute(...)returns a string (#336)⚠️ Remove thebaseDomainandbaseProtocolproperties on the Ziggy config object (#337)⚠️ Remove theappendRouteToList(),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)
v0.9.4 - 2020-06-05
Fixed
- Fix escaping of
.characters in thecurrent()method, thanks @davejamesmiller! (#296)
v0.9.3 - 2020-05-08
Added
- Add support for passing a CSP
nonceattribute to the@routesBlade directive to be set on the script tag, thanks @tminich! (#287)
Changed
- Improve support for using Ziggy with server-side rendering, thanks @emielmolenaar! (#260)
- Avoid resolving the Blade compiler unless necessary, thanks @axlon! (#267)
- Use
dist/js/route.jsas the npm package's main target, thanks @ankurk91 and @benallfree! (#276) - Readme and quality-of-life improvements (#289)
Fixed
- Ensure Ziggy's assets are always generated in the correct location (#290)
For previous changes see the Releases page.