if($request->hasFile('photos')){
if (Input::file('photos')->isValid()) {
$file = Input::file('photos');
$destination = 'images/Foldername'.'/';
$ext= $file->getClientOriginalExtension();
$mainFilename = str_random(6).date('h-i-s');
$file->move($destination, $mainFilename.".".$ext);
echo "uploaded successfully";
}
}