upload react native image to laravel code example
Example 1: how upload image in arraye in laravel
foreach ($request['contact'] as $value) {
$name = time() . rand(1000, 9999) . $value['image']->getClientOriginalName();
$value['image']->move(public_path('/src/admin/assets/uploader/workImage'), $name);
}
Example 2: convert html to image laravel
$(function() {
$("#btnSave").click(function() {
html2canvas($("#widget"), {
onrendered: function(canvas) {
theCanvas = canvas;
document.body.appendChild(canvas);
Canvas2Image.saveAsPNG(canvas);
$("#img-out").append(canvas);
}
});
});