deligoez/laravel-model-hashid
Laravel 13 support — a drop-in upgrade from v4.0.x. No code changes required; just run composer update. Laravel 11 and 12 remain fully supported alongside Laravel 13.
illuminate/contracts constraint now accepts ^13.0prefer-lowest and prefer-stable dependency resolutionsorchestra/testbench dev constraint widened to include ^11.0 for Laravel 13 testingfully_qualified_strict_types, phpdoc_line_span, ordered_imports) — pure formatting, no behavioral change| Supported | |
|---|---|
| PHP | 8.3, 8.4 |
| Laravel | 11, 12, 13 |
Full Changelog: https://github.com/deligoez/laravel-model-hashid/compare/v4.0.1...v4.1.0
DecryptsHashIds trait now makes decoded values available via validated() in addition to input(). Previously, merge() only updated the input bag while validated() returned the original hash strings from the validator snapshot.ConfigParameters is now final with a private constructorHashIdDTO is now a readonly classConfig::checkIfModelClassExist() renamed to Config::checkIfModelClassExists()HasHashIdRouting::getRouteKey() return type changed from string to mixedHashId utility class — generic encode/decode without a model (HashId::encode(), HashId::decode(), HashId::buildGenerator())Blueprint::hashId() macro — schema sugar for nullable, unique hash id columns in migrationsHashIdCast — Eloquent cast for transparent hash id attribute storageSerializesHashId trait — replaces primary key with hash id in toArray() / toJson() output[@hashid](https://github.com/hashid) Blade directive — XSS-safe hash id output in templatesDecryptsHashIds trait — auto-decodes hash id inputs to integer keys in FormRequesthashid:encode Artisan command — encode a key to a hash id via CLIhashid:decode Artisan command — decode a hash id to its key via CLIValidHashId validation rule — format validation with optional model-specific check (no DB hit)HashIdExists validation rule — database existence check for Hash IdsGenerator::build() preventing TypeError with string config valuesGenerator::parseHashIDForModel() generic path for strict comparisonGenerator::parseHashIDForModel() when prefix_length is -1HasHashIdRouting::resolveRouteBindingQuery() simplified to use static::keyFromHashId() directlyHasHashId::getHashIdRawAttribute() removed redundant getKey() callHasHashId::keyFromHashId() returns null when decode yields empty array (#25)FindOrByHashIdMixin callback parameter position correctedConfigParameters constants are now typed (PHP 8.3 typed constants)ConfigParameters::$parameters static property replaced with ConfigParameters::PARAMETERS const arrayignoreErrors migrated to identifier-based format.php-cs-fixer.php config (replaced by Pint)run-tests.yml, phpstan.yml, pint.yml workflows (unified into ci.yml)Full Changelog: https://github.com/deligoez/laravel-model-hashid/compare/v3.1.1...v4.0.0
null instead of throwing Undefined array key 0 when keyFromHashId() receives a hash ID that decodes to an empty array (#25)Thanks to @Falkan3 for reporting and @ramonmalcolm10 for the initial fix in #23.
Full Changelog: https://github.com/deligoez/laravel-model-hashid/compare/v3.0.0...3.1.0
Full Changelog: https://github.com/deligoez/laravel-model-hashid/compare/2.4.1...v3.0.0
Full Changelog: https://github.com/deligoez/laravel-model-hashid/compare/2.4.0...2.4.1
resolveRouteBindingQuery() by @bensherred in #16Full Changelog: https://github.com/deligoez/laravel-model-hashid/compare/2.3.0...2.4.0
Full Changelog: https://github.com/deligoez/laravel-model-hashid/compare/2.2.0...2.3.0
findOrByHashId Query Builder method by @deligoez in https://github.com/deligoez/laravel-model-hashid/pull/12Full Changelog: https://github.com/deligoez/laravel-model-hashid/compare/2.1.0...2.2.0
Full Changelog: https://github.com/deligoez/laravel-model-hashid/compare/2.0.0...2.1.0
How can I help you explore Laravel packages today?