{"repo":"deligoez/laravel-model-hashid","free":true,"listed":false,"github":"https://github.com/deligoez/laravel-model-hashid","clone":"git clone https://github.com/deligoez/laravel-model-hashid.git","description":"#️⃣ Generate, Save, and Route Stripe/Youtube-like Hash IDs for Laravel Eloquent Models","language":"PHP","stars":166,"topics":["laravel","php","hashids","laravel-package"],"license":null,"category":"databases-storage","readme_excerpt":"Generate, save, and route Stripe-like Hash Ids for your Laravel Eloquent Models. Hash Ids are short, unique, and non-sequential identifiers that hide database row numbers from users. For more information, visit hashids.org. For a User model with an id of 1234 , you can generate Hash Ids like user kqYZeLgo . You have complete control over Hash Id length, prefix, separator, and alphabet. Check out the configuration section for details. Table of Contents - Requirements - Installation - Usage - Hash Id Generation - Query Builder Functions - Route Model Binding (Optional) - Saving Hash Ids to Database (Optional) - Generic Hash Ids - Blueprint Macro - Hash Id Cast - Serialization - Blade Directive - Decrypting Hash Ids in Form Requests - Artisan Commands - Validation - Hash Id Terminology - Configuration - Upgrading - Testing - Changelog - Contributing - Security Vulnerabilities - Credits - License Requirements Package PHP Laravel --------- ------------ ------------ ^4.0 ^8.3 ^11.0, ^12.0, ^13.0 ^3.0 ^8.2 ^9.0 - ^11.0 ^2.0 ^8.1 ^9.0 - ^12.0 ^1.0 ^8.0 ^8.0 Installation 1. Install via Composer: 2. Publish the config file: Usage Hash Id Generation Add the HasHashId trait to any Eloquent model: This gives you hashId and hashIdRaw attributes, plus a keyFromHashId() static method: Query Builder Functions All finding-related query builder functions work with Hash Ids: Route Model Binding (Optional) Add the HasHashIdRouting trait to enable route model binding with Hash Ids: Implicit Bindin","default_branch":null,"files":null,"tree":[],"storefront":"/r/deligoez","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/deligoez/laravel-model-hashid/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}