php - Qrcode generate by id in laravel -
i have qrcode in there have trouble. in app want qrcode can auto generate id.my code work exiting not make qrcode show code text. can tell me how fix ?
so, there view :
<div class="col-lg-12 code"> {!! qrcode::size(250)->generate('<?php echo $row->name?>'); !!} <p>scan locations.</p> </div>
and controller, :
public function getedit($id) { $data['row'] = locations::find($id); return view('locations_form',$data); } public function posteditsave($id) { $simpan= array(); $simpan['name']=request::input('name'); $simpan['id_cms_companies']=request::input('id_cms_companies'); db::table('locations')->where('id', $id)->update($simpan); session::flash('edit', 'data berhasil di edit'); return redirect::to('locations'); }
you have error in code. try this:
<div class="col-lg-12 code"> {!! qrcode::size(250)->generate($row->name) !!} <p>scan locations.</p> </div>
everything inside {!! !!}
php , don't need use <?php echo $var ?>
here.
Comments
Post a Comment