Hi I can pass the data to Controller and tried to get processed data or array in controller to my view file using jQuery. I tried a lot to figure it out but not getting the data, error shows in console :
{"error":{"type":"ErrorException","message":"Trying to get property of non-object ..."}}
My stuffs are given below -
Controller :
public function addRow()
{
if(Request::ajax()){
$row = Input::all();
}
return View::make('add-stock')
->with('rows', $row);
}
View:
@if( isset($rows) )
@foreach($rows as $row)
{{$row->row}}
@endforeach
@endif
->with('rows')(even when it's empty). You may get better results checking for@if( !empty($rows) )in your view.