I'm having trouble creating random names for my images. I was having the md5 function (mt_rand (1,10000) but I did not succeed using it together with has :: file.
public function anexar () {
if(Input::hasFile('file')){
$file = Input::file('file');
$file->move('uploads', $file->getClientOriginalName());
return 'Anexado com sucesso';
}
}
}