<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>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                ## 資源路由 資源路由也稱為RESTful路由 [TOC] 路由說明 ~~~ 動詞 請求方法 pathinfo 行為 // 默認索引 'index' => ['get', '', 'index'], // 創建 'create' => ['get', '/create', 'create'], // 添加 'save' => ['post', '', 'save'], // 修改 'edit' => ['get', '/{id}/edit', 'edit'], // 閱讀 'read' => ['get', '/{id}', 'read'], // 更新 'update' => ['put', '/{id}', 'update'], // 刪除 'delete' => ['delete', '/{id}', 'delete'], ~~~ 以上羅列出來的也是可以修改的 方法參數 ~~~ /** * 注冊一個資源路由 * @param [type] $path [匹配路徑] * @param [type] $controller [執行的控制器] * @param array $selection [改變默認執行方法] * @param array $option [匹配前后的事件] * @param array $behavior [匹配前后的事件] * @return [type] [description] */ public function resoure($path, $controller, $selection = [], $option = [], $behavior = []) ~~~ 示例: `Route::resoure('blog', 'index/blog');` 訪問localhost/index.php/blog時就會路由到index/blog/index 訪問localhost/index.php/blog/32/edit會路由到index/blog/edit方法 ### 排除某一個路由 `Route::resoure('blog', 'index/blog', ['except=>['delete','put']]);` 注冊時就會排除delete方式和put方式 ### 只允某些路由 `Route::resoure('blog', 'index/blog', ['except=>['delete','put'],'only'=>['index','create']]);` 主要在注冊時就僅僅注冊這兩個 ### 修改默認行為 `Route::resoure('blog', 'index/blog', ['except=>['delete','put'], 'behavior'=>['index'=>['get','','look']]]);` 這樣在訪問時就會路由到index/blog/look方法 ### 在配置文件中使用 只需要參數對應即可 ~~~ // 資源路由 restful 'resoure' => [ [ 'blog', 'index/index', [ 'behavior' => [ 'index' => ['get', '', 'index'], ], ], ], ], ~~~ ### 提示 其實注冊資源路由就是把這些路由分別注冊到靜態路由和正則路由上面,個人推薦直接在正則路由和靜態路由上注冊更加的靈活
                  <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>

                              哎呀哎呀视频在线观看