'json', ]; public static function fromOrder(Orders $orders){ if($orders['tax']){ $has=self::where('user_id',$orders['user_id'])->where('tax',json_encode($orders['tax'],JSON_UNESCAPED_UNICODE))->find(); if(!$has) { self::create([ 'user_id' => $orders['user_id'], 'tax' => $orders['tax'], ]); } } } }