jeudi 9 février 2017

I am passing variable $input from controller to view in laravel and it shows an error undefined variable $input in View

I am passing variable $input from controller to view in laravel 5.0 and it shows an error undefined variable $input in View .can anyone suggest something ?? when you print_r($input) in controller it gives an array but $input is not giving its value in view. Code works fine if we use $_POST since it is a global varaiable instead of any other variable.

controller

namespace App\Http\Controllers;

use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Input;
use App\show;
use App\register;

class User extends BaseController
{


    public function store()
{       
     $input = Input::all();





    return view('show',(array)$input);
}

}
 view show

<html>
    <head>






    </head>
    <body>
              <div>


            Name:  <label><?php echo $input['EmailID']?></label><br>




          </div>
                      </body>
                      </html>

help needed!!!plz



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2kLELBS
via IFTTT

Aucun commentaire:

Enregistrer un commentaire