我在控制器中声明了一个公共函数:
public function deaths()
{
$getdeaths = DB::statement('SELECT * FROM player_deaths ORDER BY time DESC LIMIT 10');
return View::make('main.latestdeaths')->with('getdeaths', $getdeaths);
}
然后我尝试检索数据:
<td>{{ $getdeaths->player_id }}</td>
但它不起作用。收到Trying to get property of non-object
错误。是否可以检索它或?