• <dl id="2u8ki"><small id="2u8ki"></small></dl>
    • <rt id="2u8ki"><em id="2u8ki"></em></rt>
    • <menu id="2u8ki"></menu>
      0712-2888027 189-8648-0214
      微信公眾號

      孝感風(fēng)信網(wǎng)絡(luò)科技有限公司微信公眾號

      當(dāng)前位置:主頁 > 技術(shù)支持 > PHP > Laravel Hashids一款不錯的哈希數(shù)據(jù)ID解決方案

      Laravel Hashids一款不錯的哈希數(shù)據(jù)ID解決方案

      時間:2018-12-04來源:風(fēng)信官網(wǎng) 點擊: 1809次
      在Laravel中我們使用composer進(jìn)行安裝 vinkla/hashids開源庫,可以將字符串ID轉(zhuǎn)化為數(shù)字ID。

      我們使用composer進(jìn)行安裝,最新的laravel-hashids 需要Laravel 5.6版本以上支持。

      $ composer require vinkla/hashids

      擴(kuò)展包配置

      $ php artisan vendor:publish

      GitHUB項目地址:https://github.com/vinkla/laravel-hashids

      使用示例代碼:

      使用use引入Hashids

      // You can alias this in config/app.php.
      use Vinkla\Hashids\Facades\Hashids;

      對字符串進(jìn)行加密
      Hashids::encode(4815162342);
      // We're done here - how easy was that, it just works!

      對字符串進(jìn)行解密
      Hashids::decode('doyouthinkthatsairyourebreathingnow');
      // This example is simple and there are far more methods available.
      熱門關(guān)鍵詞: Laravel Hashids 哈希數(shù)據(jù)ID
      欄目列表
      推薦內(nèi)容
      熱點內(nèi)容
      展開
      中文字幕无码AV黄片,亚洲天堂日本美女,国产亚洲色婷婷久久99精品91,午夜无码不卡视频 99久色图精品国产 精品熟女少妇A∨免费久久
    • <dl id="2u8ki"><small id="2u8ki"></small></dl>
      • <rt id="2u8ki"><em id="2u8ki"></em></rt>
      • <menu id="2u8ki"></menu>