hello guys i have a problem with my ajax data json, i have a project about scan a barcode with a webcam but it just views the code of the barcode, the data in the database not call in my ajax, this is the code of blade, i’m using a modal
this is the modal
<div id="myModal" class="modal fade" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="scanModalLabel">Scan Barcode</h5>
<button type="button" class="close close-btn" data-dismiss="myModal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<dl class="row">
<dt class="col-sm-4"><h4>Kode Barang</h4></dt>
<dd class="col-sm-8" id="kode_barang"></dd>
</dl> <hr>
<table class="table align-items-center tabel-detail" >
<thead class="thead-light">
<tr>
<th>Nama Barang</th>
<th>Harga Jual</th>
<th>Stok</th>
<th>Insert</th>
</tr>
</thead>
<tbody class="list">
</tbody>
</table>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div>
this is the jquery code
var args = {
autoBrightnessValue: 100,
resultFunction: function(res) {
[].forEach.call(scannerLaser, function(el) {
$(el).fadeOut(300, function() {
$(el).fadeIn(300);
});
});
scannedImg.attr("src", res.imgData);
scannedQR.text(res.format + ": " + res.code);
console.log(res.code);
document.getElementsByName('qrcode')[0].value = res.code;
var kode= res.code;
$('#kode_barang').text(': '+kode);
$.ajax({
url:"{{ route('daftar_produk.scan') }}",
method:'GET',
data:{kode:kode},
dataType:'json',
success:function(data)
{
$('.list').html(data.table_data)
}
});
$('#myModal').modal('show');
},
this is the controller
public function cekScan(Request $req)
{
$id = $req->get('kode');
$output='';
$produk = Produk::findOrFail($id)
->where('kode_barang', '=', $id)
->select('produks.*')
->first();
$no = 0;
$data = array();
foreach ($produk as $list) {
$no ++;
$output .= '<tr><td>'.$no.'</td><td>'.$list->nama_barang.'</td><td>'."Rp.".format_uang($list->harga_jual).'</td><td>'.$list->stok.'</td><td><a type="button" data-stok=(('.$list->stok.')) data-id=(('.$list->id.')) data-nama=(('.$list->nama_barang.')) data-kode=(('.$list->kode_barang.')) data-harga=(('.$list->harga_jual.')) class="btn btn-primary btn-pilih" role="button">Insert</a></td></tr>';
}
$data = array(
'table_data' => $output
);
return json_encode($data);
}
this is the route
Route::get('transaksi/scan', '\App\Http\Controllers\ProdukController@cekScan')->name('daftar_produk.scan');
what should i do the error said "jquery.min.js:2 GET http://localhost:8080/rezkastore1/%7B%7B%20route(‘daftar_produk.scan’)%20%7D%7D?kode=2135758676 404 (Not Found)"
modafinil addiction – modafinil anxiety provigil settlement
roaccutane without a prescription – compare accutane prices accutane buy india
amoxicillin price – buy amoxicillin noscript canada amoxicilina 500 mg from mexico
bayer vardenafil online – buy vardenafil online australia vardenafil levitra
ivermectin australia – ivermectin 24 mg ivermectin brand name
best european online pharmacy – blue chew cialis cialis 5mg price
stromectol tablets for humans for sale – ivermectin 6 mg ivermectin 5ml
buy accutane online south africa – accutane usa where can you get accutane
lyrica 200 mg price – lyrica 200 mg price canadian pharmacy levitra value pack
amoxicillin brand over the counter – amoxicillin without a doctorвЂs prescription buy amoxicillin 500 mg mexico
viagra 100 mg best price in india – where to buy viagra online safely order generic viagra online usa
stromectol cost – buy ivermectin 12mg buy ivermectin for humans
how to get prednisone without a prescription – 5 mg prednisone tablets how much is prednisone
provigil online – modafinil side effects buy provigil online
buy zithromax 250mg online – low cost zithromax z pack antibiotic
lasix 40 price – lasix without script furosemide 160
clomid coupon – bbclomid buy clomiphene 25mg
cialis 5mg sale – tadalafil dosage 40 mg cialis 5mg price in australia
ivermectin tablets – ivermectin 0.08 oral solution ivermectin tablets uk
online casino usa – best online casino real money casino moons online casino
gnc ed pills – ed pills that work quickly ed pills that really work
prednisone medicine – generic prednisone 20mg prednisone india
viagra cheapest prices – viagra soft buy viagra order
generic cialis online pharmacy canada – Cialis buy cialis pills for sale in canada
ivermectin malaria – ivermectin brand name buy ivermectin canada
what is the best ed pill – best ed treatment medications for ed
ventolin hfa inhaler – onventolinp.com ventolin generic brand
how much is misoprostol – cytotec 200mg tablets buy cytotec pills online
purchase neurontin canada – synthroid 112 coupon levothyroxine 0.15
prednisone 80 mg – 60 mg prednisone prednisone 5 mg tablet
where can you get accutane – purchase accutane accutane canada cost
medrol tablet 8 mg – lyrica tablets 100mg lyrica medicine
dissertation writers online – nursing essay help research paper assistance
sildenafil 130 mg – Low cost viagra viagra non prescription
stromectol ireland – ivermectin cost in usa can you buy stromectol over the counter
online order prednisone – buy prednisone online from canada prednisone purchase canada
furosemide lasix – furosemide price in usa where can i buy furosemide without a script
ventolin medication – albuterol sulfate ventolin online
cytotec 400 mcg – where to buy cytotec in canada cytotec singapore pharmacy
stromectol oral – ivermectin oral stromectol canada
hydroxychloroquine studies – plaquenil hydroxychloroquine 1250 mg prednisone
vidalista 60 side effects – buy vidalista 60 mg online 20%off cenforce 100 mg online
orlistat mexico – xenical cost nz orlistat mice
viagra sildenafil 150mg – cheap tadalafil for sale brand tadalafil 5mg
generique sildenafil 200mg – acheter 40mg du cialis tadalafil 40mg generique
buy prednisone 20mg generic – prednisone 5mg drug order prednisone 20mg generic
buy accutane 20mg for sale – buy generic metformin 500mg purchase amoxil without prescription
buy cialis pills cialis tadalafil
order pregabalin 150mg pills – cetirizine 10mg pill zithromax drug
buy cialis tadalafil without a doctor prescription
tizanidine order online – colchicine 0.5mg drug order colchicine sale
cialis cost canada generic tadalafil
canada generic tadalafil cheap cialis pills for sale
tadalafil liquid buy generic cialis online with mastercard
cialis without prescription where to buy generic cialis online safely
https://cialisbusd.com/ canada generic tadalafil
tadalafil side effects tadalafil online
where to buy generic cialis online safely https://cialisicp.com/
buy 12mg ivermectin https://ivermectinetc.com/
purchase ivermectin online stromectol 6 g
buy stromectol 12 mg