I am trying to upload image in Laravel. Getting following error:
My code is given below:
public function uploadImage($image, $image_path)
{
$path = config('global.' . $image_path . '_image_path');
file_exists($image) && unlink($image);
$image_name = 'bvend-' . $image_path . '-' . time() . '.' . $image->getClientOriginalExtension();
$image->move($path, $image_name); // $path: public_path('uploads/products')
return $image_name;
}
I understand its a simple issue but still no clue where it causing issue.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire