Laravel 4 how to display flash message in view?

后端 未结 11 1127
粉色の甜心
粉色の甜心 2021-02-04 00:33

I\'m trying to get my flash message to display.

This is in my routing file

Route::post(\'users/groups/save\', function(){

return Redirect::to(\'users/g         


        
11条回答
  •  萌比男神i
    2021-02-04 01:16

    i just realized in using the Redirect::to(), when you use the withInput() method, chaining a with() function to pass variables will not work. the only way is either you flash your inputs separately using Input::flash(), and use the with() to pass your variables or you pass your variable via session using Session::flash('key','val') and retrieve in the view via session::get('key').

提交回复
热议问题