久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  • <tfoot id='ks7C2'></tfoot>
    1. <small id='ks7C2'></small><noframes id='ks7C2'>

        <bdo id='ks7C2'></bdo><ul id='ks7C2'></ul>
      <legend id='ks7C2'><style id='ks7C2'><dir id='ks7C2'><q id='ks7C2'></q></dir></style></legend>
        <i id='ks7C2'><tr id='ks7C2'><dt id='ks7C2'><q id='ks7C2'><span id='ks7C2'><b id='ks7C2'><form id='ks7C2'><ins id='ks7C2'></ins><ul id='ks7C2'></ul><sub id='ks7C2'></sub></form><legend id='ks7C2'></legend><bdo id='ks7C2'><pre id='ks7C2'><center id='ks7C2'></center></pre></bdo></b><th id='ks7C2'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='ks7C2'><tfoot id='ks7C2'></tfoot><dl id='ks7C2'><fieldset id='ks7C2'></fieldset></dl></div>

        將變量從控制器傳遞到視圖 - Laravel

        Passing variable from controller to view - Laravel(將變量從控制器傳遞到視圖 - Laravel)
          <i id='UkpX0'><tr id='UkpX0'><dt id='UkpX0'><q id='UkpX0'><span id='UkpX0'><b id='UkpX0'><form id='UkpX0'><ins id='UkpX0'></ins><ul id='UkpX0'></ul><sub id='UkpX0'></sub></form><legend id='UkpX0'></legend><bdo id='UkpX0'><pre id='UkpX0'><center id='UkpX0'></center></pre></bdo></b><th id='UkpX0'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='UkpX0'><tfoot id='UkpX0'></tfoot><dl id='UkpX0'><fieldset id='UkpX0'></fieldset></dl></div>

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

            <bdo id='UkpX0'></bdo><ul id='UkpX0'></ul>

              <legend id='UkpX0'><style id='UkpX0'><dir id='UkpX0'><q id='UkpX0'></q></dir></style></legend>
                <tbody id='UkpX0'></tbody>
                1. <tfoot id='UkpX0'></tfoot>
                  本文介紹了將變量從控制器傳遞到視圖 - Laravel的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我正在嘗試將一個變量從一個視圖傳遞到另一個視圖的控制器.我沒有收到任何錯誤,但是當它進入最后一個視圖時,它沒有像預期的那樣顯示變量.在第一個視圖中,我只是得到一個名字.

                  I'm trying to pass a variable from one view to a controller to another view. I'm not getting any errors, but when it gets to the last view, it doesn't show the variable like it's supposed to. In the first view, I'm just getting a name.

                  {{ Form::open(array('route' => 'form', 'method'=>'post')) }}
                      {{ $name = Form::text('name') }}
                      {{ Form::submit('Go!') }}
                  {{ Form::close() }}
                  

                  這是我的 HomeController.php.

                  Here is my HomeController.php.

                  public function view1()
                  {
                      return View::make('stuff');
                  }
                  
                  public function postView1($name)
                  {
                      return Redirect::route('view2')->with($name);
                  }
                  
                  public function view2($name)
                  {
                      return View::make('view2')->with($name);
                  }
                  

                  routes.php

                  Route::get('/', array('as' => 'stuff', 'uses' => 'HomeController@stuff'));
                  Route::post('form/{name}', array('as' => 'form', 'uses'=>'HomeController@postView1'));
                  Route::get('view2/{name}', array('as' => 'view2', 'uses' => 'HomeController@view2'));
                  

                  view2.blade.php

                  view2.blade.php

                  {{ $name = Input::get('name') }}
                  <p> Hello, {{ $name }} </p>
                  

                  那為什么不顯示呢?

                  推薦答案

                  首先你應該把你的 postView 函數改成:

                  First you should change your postView function into:

                  public function postView1()
                  {
                      return Redirect::route('view2', ['name' => Input::get('name')]);
                  }
                  

                  還有你的路線:

                  Route::post('form/{name}', array('as' => 'form', 'uses'=>'HomeController@postView1'));
                  

                  進入:

                  Route::post('form', array('as' => 'form', 'uses'=>'HomeController@postView1'));
                  

                  現在,您應該將 view2 函數更改為:

                  Now, you should change your view2 function into:

                  public function view2($name)
                  {
                      return View::make('view2')->with('name',$name);
                  }
                  

                  現在在您的 view2.blade.php 中,您應該可以使用:

                  Now in your view2.blade.php you should be able to use:

                  <p> Hello, {{ $name }} </p>
                  

                  這篇關于將變量從控制器傳遞到視圖 - Laravel的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Deadlock exception code for PHP, MySQL PDOException?(PHP、MySQL PDOException 的死鎖異常代碼?)
                  PHP PDO MySQL scrollable cursor doesn#39;t work(PHP PDO MySQL 可滾動游標不起作用)
                  PHP PDO ODBC connection(PHP PDO ODBC 連接)
                  Using PDO::FETCH_CLASS with Magic Methods(使用 PDO::FETCH_CLASS 和魔術方法)
                  php pdo get only one value from mysql; value that equals to variable(php pdo 只從 mysql 獲取一個值;等于變量的值)
                  MSSQL PDO could not find driver(MSSQL PDO 找不到驅動程序)
                  <i id='auETO'><tr id='auETO'><dt id='auETO'><q id='auETO'><span id='auETO'><b id='auETO'><form id='auETO'><ins id='auETO'></ins><ul id='auETO'></ul><sub id='auETO'></sub></form><legend id='auETO'></legend><bdo id='auETO'><pre id='auETO'><center id='auETO'></center></pre></bdo></b><th id='auETO'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='auETO'><tfoot id='auETO'></tfoot><dl id='auETO'><fieldset id='auETO'></fieldset></dl></div>
                  1. <small id='auETO'></small><noframes id='auETO'>

                      <bdo id='auETO'></bdo><ul id='auETO'></ul>

                          <tbody id='auETO'></tbody>

                        1. <tfoot id='auETO'></tfoot>
                        2. <legend id='auETO'><style id='auETO'><dir id='auETO'><q id='auETO'></q></dir></style></legend>

                            主站蜘蛛池模板: 欧美一区2区三区4区公司 | 国产精品久久久久久久久久久新郎 | 99在线免费视频 | 国产精品www | 中文字字幕一区二区三区四区五区 | 中文字幕 国产精品 | 最新中文在线视频 | 精品国产99 | 精品少妇一区二区三区在线播放 | 欧美成人自拍视频 | 一区二区三区四区在线视频 | 欧美性受xxx | 91在线导航| 日韩欧美在线不卡 | 中文字幕91 | 精品久久久久久久久久久院品网 | 宅男伊人| 日日欧美 | 日本三级在线网站 | 欧美日韩精品中文字幕 | 北条麻妃国产九九九精品小说 | 亚洲精品一区二区三区四区高清 | 国产精品99久久久久久久vr | 欧美日韩1区2区3区 欧美久久一区 | 久久成人精品视频 | 午夜视频一区二区 | 日韩av一二三区 | 99re国产精品| 欧美精品国产一区二区 | 亚洲成人综合社区 | 91在线区| 午夜资源 | re久久| 免费爱爱视频 | 国产网站在线 | 成人亚洲片| 中文字幕成人 | 午夜影院在线免费观看视频 | 日本理论片好看理论片 | 欧美一区二区三区在线视频 | 日韩av在线一区二区三区 |