Image Intervention w/ Laravel 5.4 Storage

后端 未结 10 861
执笔经年
执笔经年 2021-02-05 03:16

I\'m using the storage facade to store a avatar which works fine, but I want to resize my image like I did in previous versions of laravel. How can I go about doing this? Here i

10条回答
  •  攒了一身酷
    2021-02-05 03:47

    In my case the error was caused by calling the hashName method on an image instance.

        //initially
        $image = Image::make(request('image')->getRealPath());
        $filename = $image->hashName();
    
        //to fix the error
        $image = Image::make(request('image')->getRealPath());
        $filename = request('image')->hashName();
    

提交回复
热议问题