我认为我的查询没有执行。从->select('name')
它只是在我的网站上显示为纯文本。
<tbody>
@foreach($getdeaths as $getdeath)
<tr>
<? DB::table('players')->select('name')->where('id', $getdeath->player_id)->get(); ?>
<td>{{ $getdeath->player_id }}</td>
<td>{{ $getdeath->level }}</td>
<td>{{ date("d F Y (H:i)", strtotime($getdeath->time)) }}</td>
<td>@if($getdeath->is_player == 1)
{{ '<a href="characters/'.$getdeath->killed_by.'">'.$getdeath->killed_by.'</a> (PVP)' }}
@else
{{ $getdeath->killed_by }}
@endif</td>
</tr>
@endforeach
</tbody>