我想发布一个数组和一个变量来查看。这是我的变量。发布数组和变量以查看
$ausgabeSpieltag = $saisonMaxSpieltagEins;
这里是我的数组和方式,就像我现在发布它来查看。但现在我需要在 - >中添加部分变量。
$spieltagSpiel = Spielplan::where('Spieltag', '=', $ausgabeSpieltag)->where('Abgeschlossen', '=', 0)->get();
foreach($spieltagSpiel as $spieltagSpielOutput){
$heimName = Verein::where('V_ID', '=', $spieltagSpielOutput->Heimmannschaft)->first();
$gastName = Verein::where('V_ID', '=', $spieltagSpielOutput->Gastmannschaft)->first();
$resultData[$spieltagSpielOutput->Spielplan_ID] = $heimName->Name. ' - ' .$gastName->Name;
}
return view('spielplan')->with('alleSpiele', $resultData);
这里是我的输出刀片
<h3>Dateneingabe</h3>
{{$ausgabeSpieltag}}
<div class="row">
<div class="col-6 col-md-4">
<label for="">Spielauswahl</label>
<select class="form-control input-sm" name="spiele" id="spiele">
@foreach($alleSpiele as $alleSpieleKey => $alleSpieleName)
<option value="{{ $alleSpieleKey }}">
{{ $alleSpieleName }}
</option>
@endforeach
</select>
</div>
<div class="col-6 col-md-4">
<label for="">Teamauswahl</label>
<select class="form-control input-sm" name="spiel" id="spiel">
</select>
</div>
<div class="col-6 col-md-4">
Hier kommt der Abgeschlossen Button hin
</div>
</div>
一切工作排除我{{$ ausgabeVariable}}。在变量中只有1个数字,我想在Dateneingabe之后的H3中有这个。
我想拿出刀片{{yourVariable}},但它不会工作英寸这个怎么做? – HansMuff
@HansMuff请向您展示刀片文件{{yourVariable}} –
@HansMuff您的变量意味着您在视图文件中需要使用哪个变量。 –