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

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

Last updated 10 months ago.
0

thanks, very helpful material for me.

Last updated 10 months ago.
0

Thanks @swgj19 It worked out for me.

0

Sign in to participate in this thread!

LaraJobs

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.

© 2023 Laravel.io - All rights reserved.