Support the ongoing development of Laravel.io →
posted 10 years ago
Input Forms
Last updated 1 year 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 1 year ago.
0

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

Last updated 1 year ago.
0

thanks, very helpful material for me.

Last updated 1 year ago.
0

Thanks @swgj19 It worked out for me.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

swgj19 swgj19 Joined 11 Mar 2014

Moderators

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

Your logo here?

Laravel.io

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

© 2024 Laravel.io - All rights reserved.