<i id='wKjFP'><tr id='wKjFP'><dt id='wKjFP'><q id='wKjFP'><span id='wKjFP'><b id='wKjFP'><form id='wKjFP'><ins id='wKjFP'></ins><ul id='wKjFP'></ul><sub id='wKjFP'></sub></form><legend id='wKjFP'></legend><bdo id='wKjFP'><pre id='wKjFP'><center id='wKjFP'></center></pre></bdo></b><th id='wKjFP'></th></span></q></dt></tr></i><div id='wKjFP'><tfoot id='wKjFP'></tfoot><dl id='wKjFP'><fieldset id='wKjFP'></fieldset></dl></div>
<tfoot id='wKjFP'></tfoot>

      <small id='wKjFP'></small><noframes id='wKjFP'>

      <legend id='wKjFP'><style id='wKjFP'><dir id='wKjFP'><q id='wKjFP'></q></dir></style></legend>
        • <bdo id='wKjFP'></bdo><ul id='wKjFP'></ul>

        如何在 Laravel 中创建一条包罗万象的路线

        How do I make a Catch-All Route in Laravel(如何在 Laravel 中创建一条包罗万象的路线)

          <tbody id='8rGZj'></tbody>

            • <i id='8rGZj'><tr id='8rGZj'><dt id='8rGZj'><q id='8rGZj'><span id='8rGZj'><b id='8rGZj'><form id='8rGZj'><ins id='8rGZj'></ins><ul id='8rGZj'></ul><sub id='8rGZj'></sub></form><legend id='8rGZj'></legend><bdo id='8rGZj'><pre id='8rGZj'><center id='8rGZj'></center></pre></bdo></b><th id='8rGZj'></th></span></q></dt></tr></i><div id='8rGZj'><tfoot id='8rGZj'></tfoot><dl id='8rGZj'><fieldset id='8rGZj'></fieldset></dl></div>
            • <tfoot id='8rGZj'></tfoot>

              <small id='8rGZj'></small><noframes id='8rGZj'>

                  <bdo id='8rGZj'></bdo><ul id='8rGZj'></ul>
                  <legend id='8rGZj'><style id='8rGZj'><dir id='8rGZj'><q id='8rGZj'></q></dir></style></legend>
                  本文介绍了如何在 Laravel 中创建一条包罗万象的路线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我需要一个 laravel routes.php 条目,该条目将捕获网站特定 domain.com/premium-section 的所有流量,以便我可以在访问高级内容之前提示人们成为会员.

                  I need a laravel routes.php entry that will catch all traffic to a specific domain.com/premium-section of the site so that I can prompt people to become members before accessing the premium content.

                  推荐答案

                  1. 在 app/Http/routes.php 中,我创建了一个路由,该路由将捕获 domain.com/premium-section/anywhere/they/try/to/go 中的所有流量,并尝试在 PremiumSectionController 中查找并执行匹配函数
                  2. 但是没有任何匹配的方法,只是一个包罗万象的方法.

                  1. In app/Http/routes.php I create a route that will catch all traffic within domain.com/premium-section/anywhere/they/try/to/go and attempt to find and execute a matching function within PremiumSectionController
                  2. But there aren't any matching methods, just a catch-all.

                  Route::group(['as' => 'premium-section::',
                                'prefix' => 'premium-section',
                                'middleware' => ['web']],
                                function(){
                                   Route::any('', 'PremiumSectionController@premiumContentIndex');
                                   Route::controller('/', 'PremiumSectionController');
                  
                                });
                  

                  .

                      namespace AppHttpControllers;
                  
                      use ...
                  
                      class PremiumSectionController extends Controller{
                  
                          public function premiumContentIndex(){
                             return 'no extra parameters';
                          }
                  
                          //magically gets called by laravel
                          public function missingMethod($parameters = array()){
                              return $parameters;
                          }
                  
                      }
                  

                  这篇关于如何在 Laravel 中创建一条包罗万象的路线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                  PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                  mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                  Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                  Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                  Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)
                • <small id='r9cVw'></small><noframes id='r9cVw'>

                        <tbody id='r9cVw'></tbody>
                      <legend id='r9cVw'><style id='r9cVw'><dir id='r9cVw'><q id='r9cVw'></q></dir></style></legend>

                        • <bdo id='r9cVw'></bdo><ul id='r9cVw'></ul>
                          1. <i id='r9cVw'><tr id='r9cVw'><dt id='r9cVw'><q id='r9cVw'><span id='r9cVw'><b id='r9cVw'><form id='r9cVw'><ins id='r9cVw'></ins><ul id='r9cVw'></ul><sub id='r9cVw'></sub></form><legend id='r9cVw'></legend><bdo id='r9cVw'><pre id='r9cVw'><center id='r9cVw'></center></pre></bdo></b><th id='r9cVw'></th></span></q></dt></tr></i><div id='r9cVw'><tfoot id='r9cVw'></tfoot><dl id='r9cVw'><fieldset id='r9cVw'></fieldset></dl></div>
                            <tfoot id='r9cVw'></tfoot>