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

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                Sometimes many of your routes will share common requirements such as URL segments, middleware, namespaces, etc. Instead of specifying each of these options on every route individually, you may use a route group to apply attributes to many routes. Shared attributes are specified in an array format as the first parameter to the Route::group method. ## Middleware Middleware is applied to all routes within the group by defining the list of middleware with the middleware parameter on the group attribute array. Middleware will be executed in the order you define this array: ~~~ Route::group(['middleware' => 'foo|bar'], function() { Route::get('/', function() { // Has Foo And Bar Middleware }); Route::get('user/profile', function() { // Has Foo And Bar Middleware }); }); ~~~ ## Namespaces 您一樣可以在 group 屬性數組中使用 namespace 參數,指定在這群組中控制器的命名空間: ~~~ Route::group(['namespace' => 'Admin'], function() { // Controllers Within The "App\Http\Controllers\Admin" Namespace Route::group(['namespace' => 'User'], function() { // Controllers Within The "App\Http\Controllers\Admin\User" Namespace }); }); ~~~ > 注意: 在默認情況下,RouteServiceProvider 包含內置您命名空間群組的 routes.php 文件,讓您不須使用完整的 App\Http\Controllers 命名空間前綴就可以注冊控制器路由。 ## 子域名路由 Laravel 路由一樣可以處理通配符的子域名,并且從域名中傳遞您的通配符參數: 注冊子域名路由 ~~~ Route::group(['domain' => '{account}.myapp.com'], function() { Route::get('user/{id}', function($account, $id) { // }); }); ~~~ ## 路由前綴 群組路由可以通過群組的描述數組中使用 prefix 選項,將群組內的路由加上前綴: ~~~ Route::group(['prefix' => 'admin'], function() { Route::get('users', function() { // Matches The "/admin/users" URL }); }); ~~~ You can also utilize the prefix parameter to pass common parameters to your routes: Registering a URL parameter in a route prefix ~~~ Route::group(['prefix' => 'accounts/{account_id}'], function() { Route::get('detail', function($account_id) { // }); }); ~~~ You can even define parameter constraints for the named parameters in your prefix: ~~~ Route::group([ 'prefix' => 'accounts/{account_id}', 'where' => ['account_id' => '[0-9]+'], ], function() { // Define Routes Here }); ~~~
                  <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>

                              哎呀哎呀视频在线观看