Esempio n. 1
0
 public function save($input)
 {
     //
     // $barcode = Barcode::find($input['id']);
     if ($barcode = Barcode::where('product_id', '=', $input['product_id'])->first()) {
         $barcode->imageurl = $input['imageurl'];
         $barcode->barcodekey = $input['barcodekey'];
         $barcode->save();
     } else {
         $barcode = Barcode::create($input);
     }
     return $barcode;
 }
 public function all()
 {
     return Barcode::all();
 }