title: Laravel file upload confusion
body: <p>So, I am trying to battle the old file upload inside of the Laravel framework but getting a bit lost. I have managed to get the upload to work so the file uploads and saved into an assets folder with a random string name.</p>
  
  <p>This is the form:</p>
  
  <pre><code>&lt;form action="{{ URL::route('account-upload') }}" method="post"&gt;
  {{ Form::label('file','Upload File') }}
  {{ Form::file('file') }}
  &lt;br /&gt;
  {{ Form::submit('Upload') }}
  {{ Form::token() }}
  &lt;/form&gt;
  </code></pre>
  
  <p>This is the Route:</p>
  
  <pre><code>Route::get('/account/upload', array(
      'as' =&gt; 'account-upload',
      'uses' =&gt; 'AccountController@getUpload'
  ));
  
  
      Route::post('/account/upload', function(){
  
          if (Input::hasFile('file')){
              $dest = 'assets/uploads/';
              $name = str_random(6).'_'. Input::file('file')-&gt;getClientOriginalName();
              Input::file('file')-&gt;move($dest,$name);
  
              return Redirect::to('/account/upload')
                  -&gt;withGlobal('Your image has been uploaded');
          }
  
      });
  </code></pre>
  
  <p>this is the method inside AccountController:</p>
  
  <pre><code>public function getUpload(){
      return View::make('account.upload');
  }
  
  public function postUpload() {
       $user  = User::find(Auth::id());
       $user-&gt;image  = Input::get('file');
  }
  </code></pre>
  
  <p>I am now trying to enable that to push the string name into the database and also be associated with the user who uploaded it and show as their profile image? Ay pointers would be great!</p>
  
  <p>I have created a row inside of the database named 'file' with the type of text....I am not sure on this point of how to store and view the image.</p>