hello people here is my code below for controller
$siteinformation = DB::table('siteinformation')->where('Site',$myarr[0]['site'])->select()->get();
print_R($siteinformation); will display
Array ( [0] => stdClass Object ( [Site] => site1 [Nickname] => friend [ProgramID] => 1 [CreateDateTime] => 2014-06-03 18:05:39 ) )
I am trying to pass it to view
return Redirect::to('sbs_site')->with('siteinformation',$siteinformation);
In my view i have...
@if(Session::has('siteinformation'))
@foreach ($siteinformation as $key => $value)
{{ $value->Nickname }}
@endforeach
@endif
Iam gettng an error Undefined variable: siteinformation
my route file contains... Route::post('sbs_site', array('uses' => 'myController@sys_config'));
what could be the problem??