Controller File:
use Image;
if ($request->file('dp')) {
$image = $request->file('dp');
$img_name = hexdec(uniqid('', true)).'.'.$image->getClientOriginalExtension();
Image::make($image)->resize(150,150)->save('upload/employee_Img/'.$img_name);
$image_path = 'upload/employee_Img/'.$img_name;
}
Employees::insert([
'dp' => $image_path,
'created_at' => Carbon::now()
]);
It was returning an error saying -- GD Library extension not available with this PHP installation.