title: Issue updating user account with avatar laravel
body: <p>So I was able to submit the form to allow an avatar to be uploaded and changed which worked. Now I am trying to allow all the user details to be updated too.</p>
  
  <p>If I just try to change the username or email and submit, the page is reloaded with the original content. When I upload a new avatar and then try to submit I get the error <strong>"Non-static method Illuminate\Http\Request::input() should not be called statically"</strong>.</p>
  
  <p>*edited*** I've just realised Im saying if the user uploads an image then update the form. Whereas I want the form to submit whether or not an image has been uploaded. How could I change my update_avatar function for this to work?</p>
  
  <p>web.php</p>
  
  <pre><code>Route::get('profile','userController@profile');
  Route::post('profile', 'userController@update_avatar');
  </code></pre>
  
  <p>userController</p>
  
  <pre><code>&lt;?php
  
  namespace App\Http\Controllers;
  
  use Illuminate\Http\Request;
  
  use Auth;
  
  use Image;
  
  class UserController extends Controller
  {
      //
      public function profile()
      {
          return view('profile', array('user' =&gt; Auth::user()) );
      }
  
      public function update_avatar(Request $request)
      {
          if($request-&gt;hasFile('avatar')){
              $avatar = $request-&gt;file('avatar');
              $filename = time() . '.' . $avatar-&gt;getClientOriginalExtension();
              Image::make($avatar)-&gt;resize(300,300)-&gt;save( public_path('/uploads/avatars/' . $filename) );
  
              $user = Auth::user();
              $user-&gt;avatar = $filename;
              $user-&gt;name = Request::input('username');
              $user-&gt;email = Request::input('email');
              $user-&gt;save();
  
          }
          return view('profile', array('user' =&gt; Auth::user()) );
      }
  }
  </code></pre>
  
  <p>profile.blade.php</p>
  
  <pre><code>&lt;img src="/uploads/avatars/{{ $user-&gt;avatar }}" style="width:150px;height:150px;float:left;border-radius:50%;margin-right:25px"&gt;    
                  &lt;h2&gt;{{ $user-&gt;name }}'s Profile&lt;/h2&gt;
  
                  &lt;form enctype="multipart/form-data" action="/profile" method="post"&gt;
                      &lt;label&gt;Update Profile Image&lt;/label&gt;
                      &lt;input type="file" name="avatar"&gt;
                      &lt;input type="hidden" name="_token" value="{{ csrf_token() }}"&gt;
  
                      &lt;label&gt;Username&lt;/label&gt;
                      &lt;input type="text" name="username" class="form-control" value="{{ $user-&gt;name }}"&gt;
                      &lt;label&gt;Email&lt;/label&gt;
                      &lt;input type="email" name="email" class="form-control" value="{{ $user-&gt;email }}"&gt;
  
                      &lt;input type="submit" class=" btn btn-sm btn-light" style="color:#2b2b2b;"&gt;
                  &lt;/form&gt;
  </code></pre>