• <legend id='P7wBi'><style id='P7wBi'><dir id='P7wBi'><q id='P7wBi'></q></dir></style></legend>

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

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

      2. 如何使用 Laravel 重定向发送数据

        How to send data using redirect with Laravel(如何使用 Laravel 重定向发送数据)
      3. <small id='1p5WU'></small><noframes id='1p5WU'>

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

            • <tfoot id='1p5WU'></tfoot>
                <tbody id='1p5WU'></tbody>
                <legend id='1p5WU'><style id='1p5WU'><dir id='1p5WU'><q id='1p5WU'></q></dir></style></legend>
                  本文介绍了如何使用 Laravel 重定向发送数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我开发了一个 API 来在页面加载时显示弹出消息.

                  I developed an API to show a pop up message when the page loaded.

                  并非所有页面都使用弹出式 API.例如,如果用户转到 show($id) 页面,则不需要触发弹出式 API.但在某些特殊情况下,我需要触发弹出窗口.

                  Not all the pages use the pop up API. For example, if the user go to the show($id) page, that doesn't required the pop up api to fire. but in some special cases, I need the pop up to be fired.

                  这是我的代码,**此代码只是为了说明我的观点,而不是实际的工作代码**

                  Here is my code, ** this code is just to illustrate my point, not an actual working code**

                  public function store(){
                      validating the input
                  
                      saving them
                  
                      $id = get the id
                  
                      return Redirect::route('clients.show, $id')
                  }
                  

                  在显示功能中我这样做:

                  and in the show function I do this:

                  public function show($id){
                     $client =Client::find($id)
                     return View::make('clients.profife')->with(array(
                     'data' => $client
                  ))
                  

                  我的问题

                  有没有办法让我可以将数据从 store 函数发送到 show 函数 使用 Redirect::route ?然后在 show 函数中,我检查是否这个 show 函数,我检查这个数据是否已经发送了什么,然后我决定是否触发弹出 api 或不是.

                  My question

                  Is there a way so I can send a data from the store function to the show function using Redirect::route ? and then in the show function, I check if this show function, I check if this data has been sent of what and then I decide whether to fire the pop up api or not.

                  }

                  推荐答案

                  In store()

                  return Redirect::route('clients.show, $id')->with( ['data' => $data] );
                  

                  并在 show() 中用

                  Session::get('data');
                  

                  这篇关于如何使用 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 的问题)
                    <tbody id='KoqNi'></tbody>
                  • <small id='KoqNi'></small><noframes id='KoqNi'>

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

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