-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Eloquent support #19
Comments
Thanks for your advice, and I also have several hashid traits in my projects. This package is just a manager for multiple connections and various encode drivers, I think it is better to let package users use it as they want, or define their own traits based on different requirements. |
Trait implementation is the same in the every project, that's why I think it can be included to the package. |
YES, I know your opinion. What I said "different requirements", such as multiple hashed columns, or keep the original value for internal use but expose the hashed value in URL or response data. For obfuscating the primary key or other sensitive columns, I prefer a non-invasive way to do this. I mean do not change the way of retrieving or saving the Eloquent ORM, do not need to explicitly call such |
Well, this approach is quite suitable for Laravel 6.x. Though there is always more than one solution and this could be the start. If you don't have time for this, I could use this repo as dependency and add these traits to a new repo |
A new repo is great 👍 |
I would like to create a pull request to add these traits for eloquent models. I would change it a bit to use this lib instead of hashid directly, but you get the idea.
I use these two alot and think it would be great to include them to this lib
HashID.php
HashIDRoutable.php
Usage
The text was updated successfully, but these errors were encountered: