Support the ongoing development of Laravel.io →
Input Forms
Last updated 3 months ago.
0
$image = Input::file('image');
			$filename  = time() . '.' . $image->getClientOriginalExtension();
			$path = public_path('img/products/' . $filename);
			Image::make($image->getRealPath())->resize(468, 249)->save($path);
			$product->image = 'img/products/'.$filename;
			$product->save();

Instead of using relative path I used absolute path and now it works like a charm.

Last updated 3 months ago.
0

Was having this problem too. thanks for posting your solution!

Last updated 3 months ago.
0

thanks, very helpful material for me.

Last updated 3 months ago.
0

Thanks @swgj19 It worked out for me.

0

Sign in to participate in this thread!

LoadForge

Your banner here too?

swgj19 swgj19 swgj19 Joined 11 Mar 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2022 Laravel.io - All rights reserved.