|
|
@@ -14,6 +14,9 @@ class CommodityBarcode extends Model
|
|
|
use ModelTimeFormat;
|
|
|
protected $fillable=['code','commodity_id','created_at'];
|
|
|
|
|
|
+ public function getCodeAttribute($value){
|
|
|
+ return str_replace(array("\r\n","\n","\r","\"","""),' ',$value);
|
|
|
+ }
|
|
|
public function commodity(){
|
|
|
return $this->belongsTo('App\Commodity','commodity_id','id');
|
|
|
}
|