Skip to content
This repository was archived by the owner on Jun 12, 2018. It is now read-only.

Commit 8ebc4ea

Browse files
authored
add similar packages
1 parent 29117b6 commit 8ebc4ea

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

README.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Laravel HashSlug
1+
# Laravel HashSlug (Hashids)
22

33
This package is useful to hide real model ids in urls using [Hashids](https://github.com/ivanakimov/hashids.php). A hashid (slug) is deterministically generated given an application, a model class and an id. Also, given a hashid (slug), the real id can be decoded. Thus no extra field needs to be stored in the database, ids are decoded on each request.
44

@@ -155,8 +155,27 @@ class Post extends Model {
155155
}
156156
```
157157

158+
## Similar packages and how is this one different
159+
160+
#### [Laravel Hashids](https://github.com/vinkla/laravel-hashids)
161+
162+
Provides a facade, but no built-in routing. Allows multiple salts through "connections". Unnecessary overhead if you need hashids only for slugging models.
163+
164+
#### [Laravel-Hashid](https://github.com/KissParadigm/Laravel-Hashid)
165+
166+
Provides a facade, similar to the above one PLUS a trait similar to this package. No no built-in routing. Untested. Unnecessary overhead if you need hashids only for slugging models.
167+
168+
#### [Hashids for Laravel 5](https://github.com/Torann/laravel-hashids)
169+
170+
Facade only. Not as good as the first one, since it allows you to have only one salt.
171+
172+
#### [Optimus](https://github.com/jenssegers/optimus)
173+
174+
Uses different obfuscation method. Facade (and class) only. Nothing related to routing or model traits. It is said to be faster than hashids.
175+
176+
158177

159178

160179
## License
161180

162-
This package (the trait and the test file) is licensed under GPLv3.
181+
This package (the trait and the test file) is licensed under GPLv3.

0 commit comments

Comments
 (0)