I have the following code
$input = Input::all();
$this->agro->create($input);
$alldata = $this->agro->all();
return View::make('agro.showdata',['myalldata'=>$alldata]);
Here when I return $alldata, all data from database is displayed.I guess here all the data is stored in $alldata variable which we are passing to the showdata view file in the variable myalldata.
Now when in myalldata, if data is not accesses it works as
<h1>DIsplaying data </h1>
But when I try to display data, it gives error Whoops, looks like something went wrong
ie
<h1>Displaying data from database<h1>
{{ $myalldata->title }}
Please help display the data from database.
Another thing, every time something is wrong, it gives error Whoops, looks like something went wrong.How to debug laravel to know where things are going wrong?
$myalldata[0]->titleor something like that". What happens when you do that?