I am using the Intervention Image Package for uploading images.
E.g.:
$this->validate($request, [
'image' => 'max:800',
]);
if($request->hasFile('image')){
$user = Auth::user();
$image = $request->file('image');
$filename = time() . '.' . $image->getClientOriginalExtension();
$location = public_path('uploads/'. $filename );
Image::make($image)->resize(300,300)->save($location);
$user->image = $filename;
$user->save();
}
This is only touching the surface. How can I get a closer look inside the process, in terms of
(1) validation,
(2) upload communication and
(3) error display, but also with respect to maybe
(4) previewing the chosen images, before uploading them?
Really looking forward for your advice, thank you