ElfSundae / laravel-hashid

Obfuscate your data by generating reversible, non-sequential, URL-safe identifiers.
MIT License
407 stars 36 forks source link

能直接应用在model中吗? #20

Open vFire opened 4 years ago

vFire commented 4 years ago

因为我的后台使用laravel nova编写,不清楚是否只修改model即可使用。谢谢!

ElfSundae commented 4 years ago

我没用过 Nova ,不明白你说的「只修改model即可使用」是什么意思?

ElfSundae commented 4 years ago

只要你能安装、配置这个库,代码中在哪使用都可以,这个库只是提供了编/解码方法,没限制怎么使用。

seek-x2y commented 3 years ago

@ElfSundae 老哥,依赖的包是不是版本太低了点? ` - elfsundae/laravel-hashid[dev-master, 1.6.0] require phpseclib/phpseclib ~2.0 -> found phpseclib/phpseclib[2.0.0, ..., 2.0.x-dev] but the package is fixed to 3.0.10 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.

image

ElfSundae commented 3 years ago

@seek-x2y laravel-hashid 不直接依赖 phpseclib,但是依赖 jenssegers/optimus 这个包,optimus 用到了 phpseclib,刚看了下 optimus 的 master 分支 已经支持了 phpseclib 3.x,等 optimus 包发布新版本了我就更新下版本。 你是自己用到 phpseclib 3.x 还是别的包依赖了 phpseclib 3.x ?如果急需要更新的话,可以试试在你项目的 composer.json 中指定依赖 jenssegers/optimus 的 dev-master 版本。

seek-x2y commented 3 years ago

@ElfSundae 十分感谢,应该是别的依赖了 phpseclib