问题描述
如何根据控制器中的请求在标签
<div class="alert alert-default" role="alert">
<h2 style="color: aliceblue;"><strong>+- {{ 7*($some_y_len) }} menit</strong> ({{ $some_y_len}} Antrean)</h2> <br>
No. antrean sekarang :<object name="no_some_y"><strong> B{{ $some_y_len + 1 }} </strong></object><br>
Rata-rata Tiap Antrean : <strong> 9 menit</strong>
</div>
及其在Controller.php中,我使用了store()函数。因为此请求值将存储到数据库
public function store(Request $request)
{
//
$string = $request->service;
$id = (int)substr($string,2);
if ($string == "--Select One--"){
Alert::error('Error','Pilihan Layanan Tidak Valid');
return back();
}
else {
$no_antre = "";
if ($id == 1){
$no_antre = $request->no_some_x;
}
else if ($id == 2) {
$no_antre = $request->no_some_y;
}
else if ($id == 3) {
$no_antre = $request->no_some_z;
}
else if ($id == 4) {
$no_antre = $request->no_some_w;
}
dd($request->no_samsat);
$user = Auth::user();
$services = Miniproject::create([
'instansi_id' => $id,'jenis_layanan' => $request->service,'user_id' => $user->id,'no_antrian' => $no_antre
]);
Alert::success('Success','Berhasil Mendapatkan Kode Antrian');
return redirect('/miniproject');
}
}
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)