Can anyone help me how to implement resizing image in Laravel?
I have this code only:
if($request->hasFile('image')){
if (Input::file('image')->isValid()) {
$file = Input::file('image');
$destination = base_path() . '/public/images/ServiceImages';
$extension = Input::file('image')->getClientOriginalExtension();
$fileName = rand(111,99999).'.'.$extension;
if(!empty($data['Image'])){
unlink($destination.$data['Image']);
}
$file->move($destination, $fileName);
$service->image=$fileName;
}
}