Level 80
thanks
@mikailfaruqali No problem?
If you need help, maybe ask an actual question instead of just dumping some code and expecting us to figure out just exactly what it is you’re asking about.
1 like
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
hi friends this is my code
if ($data->hasFile('product_img')) {
$image = $data->file('product_img');
$input['image_name'] = uniqid() . '.' . $image->getExtension();
$destinationPath = public_path('/images/backend/products');
$img = Image::make($image->getRealPath());
$img->orientate()
->resize(600, 600, function ($constraint) {
$constraint->aspectRatio();
$constraint->upsize();
})
->save($destinationPath . '/' . $input['image_name']);
}
thanks
Please or to participate in this conversation.