$image = base64_encode(file_get_contents($request->file('image')->path()));
$image = $request->image; // your base64 encoded
$image = str_replace('data:image/png;base64,', '', $image);
$image = str_replace(' ', '+', $image);
$imageName = str_random(10).'.'.'png';
File::put(storage_path(). '/' . $imageName, base64_decode($image));