You could use the Collection keyBy method instead (if the overall number of records is not excessive). This will group the records by the given property and you save a query:
public function group()
{
$groups=tbpedido::get()->keyBy('dia');
return view('groups',compact('groups'));
}
I am not 100% sure of your HTML table structure but you need nested foreach statements to render the results:
@foreach($groups as $dia => $group)
<tr>
<td>{{$dia}}</td>
@foreach($group as $tbpedido):
<td>{{ $tbpedido->ped }}<td>
@endforeach
</tr>
@endforeach