title: Laravel 4 - Change (upload imagename)
body: <p>I'd like to rename images using random name.
  Do I have to use some logic encryption?</p>
  
  <p>I have the function in my Controller postAdd to upload an image and save some information:</p>
  
  <pre><code>    public function postAdd()
      {
       $path = 'uploads/noticias';
       $file = Input::file('archivo'); 
       $archivo=$file-&gt;getClientOriginalName();
       $extension =$file-&gt;getClientOriginalExtension(); 
       $tamano=$file-&gt;getSize();
       $upload = $file-&gt;move($path, $archivo);
       if($upload)
       {
           $inputs=Input::All();
           $n= new Noticias;
          $n-&gt;titulo = $inputs["titulo"];
          $n-&gt;contenido=$inputs["contenido"];
          $n-&gt;seo_slug=$inputs["titulo"];
          $n-&gt;fecha=date("Y-m-d");
          $n-&gt;foto=$archivo;
          $n-&gt;save();
          return Redirect::to('add');
       }else
       {
          return Redirect::to('add');
       }
      }
  </code></pre>
  
  <p>How can I do it?</p>