Laravel Passing variable not working
Posted
by
Friend
on Stack Overflow
See other posts from Stack Overflow
or by Friend
Published on 2014-06-12T03:14:14Z
Indexed on
2014/06/12
3:25 UTC
Read the original article
Hit count: 162
Hello People here is my code i have used in controller...
public function bulk()
{
return View::make('bulk')->with('message','hii there');
}
my route file contains...
Route::get('bulk',array('uses'=>'HomeController@bulk'))->before('auth');
In my view Iam testing it by ...
@if(Session::has('message'))
Present
@else
not Present
@endif
The page is making a view with the message 'not Present' why is it?? I even tried
return Redirect::to('bulk')->with('message','hii there');
I get an erro mesage on Console
mypro/public/bulk net::ERR_TOO_MANY_REDIRECTS
What could be the problem?? is there any issues with name?? I tried this method earlier which worked fine for me.... :(
Iam using Blade Template..
© Stack Overflow or respective owner