<span id="pfnzv"></span>
      <form id="pfnzv"><span id="pfnzv"></span></form><address id="pfnzv"><span id="pfnzv"><nobr id="pfnzv"></nobr></span></address>
      <form id="pfnzv"><dfn id="pfnzv"><listing id="pfnzv"></listing></dfn></form>

        <sub id="pfnzv"><address id="pfnzv"></address></sub>
          <address id="pfnzv"><form id="pfnzv"><listing id="pfnzv"></listing></form></address>
          <address id="pfnzv"><address id="pfnzv"><nobr id="pfnzv"></nobr></address></address>

            <address id="pfnzv"></address>
            0712-2888027 189-8648-0214
            微信公眾號

            孝感風信網絡科技有限公司微信公眾號

            當前位置:主頁 > 技術支持 > PHP > laravel擴展包統計頁面訪問次數——awssat/laravel-visits

            laravel擴展包統計頁面訪問次數——awssat/laravel-visits

            時間:2024-08-24來源:風信官網 點擊: 1582次
            laravel擴展包統計頁面訪問次數——awssat/laravel-visits,用于統計在每個頁面的訪問次數,通過判斷IP來實現通過訪問次數的功能。
             
            項目地址:https://github.com/awssat/laravel-visits
             
            安裝命令:
             
            composer require awssat/laravel-visits
             
            安裝成功之后將配置文件發布出來:
             
            php artisan vendor:publish --provider="awssat\Visits\VisitsServiceProvider"
             
            會生成配置文件config/visits.php
             
            為了提高統計的性能,我們需要進行額外的配置
             
            在config/database.php中redis選項增加以下內容:
             
            'laravel-visits' => [
                'host' => env('REDIS_HOST', '127.0.0.1'),
                'password' => env('REDIS_PASSWORD', null),
                'port' => env('REDIS_PORT', 6379),
                'database' => 3, // anything from 1 to 15, except 0 (or what is set in default)
            ],
             
            完整的代碼如下:
             
            'redis' => [
             
                    'client' => 'predis',
             
                    'default' => [
                        'host' => env('REDIS_HOST', '127.0.0.1'),
                        'password' => env('REDIS_PASSWORD', null),
                        'port' => env('REDIS_PORT', 6379),
                        'database' => 0,
                    ],
             
                    'laravel-visits' => [
                        'host' => env('REDIS_HOST', '127.0.0.1'),
                        'password' => env('REDIS_PASSWORD', null),
                        'port' => env('REDIS_PORT', 6379),
                        'database' => 3, // anything from 1 to 15, except 0 (or what is set in default)
                    ],
             
                ],
            欄目列表
            推薦內容
            熱點內容
            展開
            国产精久久久久无码AV动漫|最新亚洲精品国偷自产在线|2021亚洲色中文字幕在线|最新无码av中文字专区 情欲美妇紧致敏感 国产免费AⅤ片在线播放 人妻爽爽免费在线视频 51精品国产人成在线观看 色偷偷av一区二区三区
            <span id="pfnzv"></span>
                <form id="pfnzv"><span id="pfnzv"></span></form><address id="pfnzv"><span id="pfnzv"><nobr id="pfnzv"></nobr></span></address>
                <form id="pfnzv"><dfn id="pfnzv"><listing id="pfnzv"></listing></dfn></form>

                  <sub id="pfnzv"><address id="pfnzv"></address></sub>
                    <address id="pfnzv"><form id="pfnzv"><listing id="pfnzv"></listing></form></address>
                    <address id="pfnzv"><address id="pfnzv"><nobr id="pfnzv"></nobr></address></address>

                      <address id="pfnzv"></address>