📜  php laravel 干预base64 到图片保存 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:23.386000             🧑  作者: Mango

代码示例1
public function postTest() {
    $data = Input::all();
    $png_url = "product-".time().".png";
    $path = public_path().'img/designs/' . $png_url;

    Image::make(file_get_contents($data->base64_image))->save($path);     
    $response = array(
        'status' => 'success',
    );
    return Response::json( $response  );
 }