if ($request->hasFile('image')) {
$image = $request->file('image');
$upload = 'uploads/image';
$filename = $image->getClientOriginalName($filename);
/* You can also use the fit(w,h) method,
which crops and resizes the image, instead of the resize(w,h) method... */
$img = Image::make($image)->resize(200, 200);
$img->save($upload.'/'.$filename);
} else {
$filename = null;
}
$datas = new Information();
$datas->idno = Input::get('idno');
$datas->email = Input::get('email');
$datas->image = $filename;
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community