<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                # 其他助手函數 #### [](https://octobercms.com/docs/services/helpers#method-asset)`asset()` 使用當前請求方案(HTTP或HTTPS)生成資產的URL: ~~~ $url = asset('img/photo.jpg'); ~~~ #### [](https://octobercms.com/docs/services/helpers#method-config)`config()` 該`config`函數獲取配置變量的值。可以使用“點”語法訪問配置值,該語法包括文件名和您希望訪問的選項。如果配置選項不存在,則可以指定默認值并返回: ~~~ $value = config('app.timezone'); $value = config('app.timezone', $default); ~~~ 的`config`輔助,也可以通過使鍵/值對的陣列用于設置配置變量在運行時: ~~~ config(['app.debug' => true]); ~~~ #### [](https://octobercms.com/docs/services/helpers#method-dd)`dd()` 該`dd`函數轉儲給定的變量并結束腳本的執行: ~~~ dd($value); ~~~ #### [](https://octobercms.com/docs/services/helpers#method-env)`env()` 該`env`函數獲取環境變量的值或返回默認值: ~~~ $env = env('APP_ENV'); // Return a default value if the variable doesn't exist... $env = env('APP_ENV', 'production'); ~~~ #### [](https://octobercms.com/docs/services/helpers#method-get)`get()` 該`get`函數從請求中獲取輸入項,僅限于GET變量: ~~~ $value = get('key', $default = null) ~~~ #### [](https://octobercms.com/docs/services/helpers#method-input)`input()` 該`input`函數從請求中獲取輸入項: ~~~ $value = input('key', $default = null) ~~~ #### [](https://octobercms.com/docs/services/helpers#method-post)`post()` 該`post`函數從請求中獲取輸入項,僅限于POST變量: ~~~ $value = post('key', $default = null) ~~~ #### [](https://octobercms.com/docs/services/helpers#method-redirect)`redirect()` 該`redirect`函數返回重定向器的實例以進行[重定向響應](https://octobercms.com/docs/services/response-view#redirects): ~~~ return redirect('/home'); ~~~ #### [](https://octobercms.com/docs/services/helpers#method-request)`request()` 該`request`函數返回當前[請求實例](https://octobercms.com/docs/services/request-input): ~~~ $referer = request()->header('referer'); ~~~ #### [](https://octobercms.com/docs/services/helpers#method-response)`response()` 該`response`函數創建[響應](https://octobercms.com/docs/services/response-view)實例或獲取響應工廠的實例: ~~~ return response('Hello World', 200, $headers); return response()->json(['foo' => 'bar'], 200, $headers); ~~~ #### [](https://octobercms.com/docs/services/helpers#method-route)`route()` 該`route`函數為給定的[命名路由](https://octobercms.com/docs/services/router)生成一個URL: ~~~ $url = route('routeName'); ~~~ 如果路由接受參數,則可以將它們作為方法的第二個參數傳遞: ~~~ $url = route('routeName', ['id' => 1]); ~~~ #### [](https://octobercms.com/docs/services/helpers#method-secure-asset)`secure_asset()` 使用HTTPS生成資產的URL: ~~~ echo secure_asset('foo/bar.zip', $title, $attributes = []); ~~~ #### [](https://octobercms.com/docs/services/helpers#method-trace-log)`trace_log()` 該`trace_log`函數將跟蹤消息寫入日志文件。 ~~~ trace_log('This code has passed...'); ~~~ 該函數支持傳遞異常,數組和對象: ~~~ trace_log($exception); trace_log($array); trace_log($object); ~~~ 您還可以傳遞多個參數來跟蹤多個消息: ~~~ trace_log($value1, $value2, $exception, '...'); ~~~ #### [](https://octobercms.com/docs/services/helpers#method-trace-sql)`trace_sql()` 該`trace_sql`功能啟用數據庫日志記錄并開始監視所有SQL輸出。 ~~~ trace_sql(); Db::table('users')->count(); // select count(*) as aggregate from users ~~~ #### [](https://octobercms.com/docs/services/helpers#method-url)`url()` 該`url`函數生成給定路徑的標準URL: ~~~ echo url('user/profile'); echo url('user/profile', [1]); ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看