I would like to send Informations from one function to an another with the ->with(key, val)
function, but it doesn't work. I've tried soo many things but it doesn't work.
Here my actual setup (I'm using laravel 5.2):
routes.php
Route::group(['middleware' => ['web']], function() {
Route::get("/test1", "InfoController@test1");
Route::get("/test2", "InfoController@test2");
});
InfoController.php
class InfoController extends Controller
{
public function test1(){
return View::make("infos");
}
public function test2(){
return Redirect::to("/test1")->with("hello", "world");
}
}
Infos.blade.php
{{\Illuminate\Support\Facades\Session::get("hello")}}
The sit empty -> no output.
Where is the problem?