title: I am getting the error: Indirect modification of overloaded property App\User::$profile has no effect
body: <p>I have a relationship between two models in my application: Users and Profile. The User model has a <code>hasOne</code> relationship with the profile model. When I try to run an update method from my Profile Controller I get the error: Indirect modification of overloaded property App\User::$profile has no effect.
  This is my update method:</p>
  
  <pre><code>public function update(Request $request, $id)
  {
       $this-&gt;validate($request, [
          'name' =&gt; 'required',
          'email' =&gt; 'required|email',
          'facebook' =&gt; 'required|url',
          'youtube' =&gt; 'required|url'
      ]);
      $user = Auth::user();
      //dd($user);
      if($request-&gt;hasFile('avatar'))
      {
          $avatar = $request-&gt;avatar;
          $avatar_new_name = time() . $avatar-&gt;getClientOriginalName();
          $avatar-&gt;move('uploads/avatars', $avatar_new_name);
          $user-&gt;profile-&gt;avatar = 'uploads/avatars/' . $avatar_new_name ; 
          $user-&gt;profile-&gt;save();
      }
      $user-&gt;name = $request-&gt;name;
      $user-&gt;email = $request-&gt;email;
      $user-&gt;profile-&gt;facebook = $request-&gt;facebook;
      $user-&gt;profile-&gt;youtube = $request-&gt;youtube;
      $user-&gt;profile-&gt;about = $request-&gt;about;
      $user-&gt;save();
      $user-&gt;profile-&gt;save();
      if($request-&gt;has('password'))
      {
          $user-&gt;password = bcrypt($request-&gt;password);
  
          $user-&gt;save();
      }
      Session::flash('success', 'Account profile updated.');
      return back();
  
  }
  </code></pre>
  
  <p>This is my User.php file:</p>
  
  <pre><code>&lt;?php
  
  namespace App;
  
  use Illuminate\Notifications\Notifiable;
  use Illuminate\Foundation\Auth\User as Authenticatable;
  
  class User extends Authenticatable
  {
  use Notifiable;
  
  /**
   * The attributes that are mass assignable.
   *
   * @var array
   */
  protected $fillable = [
      'name', 'email', 'password', 'admin'
  ];
  
  /**
   * The attributes that should be hidden for arrays.
   *
   * @var array
   */
  protected $hidden = [
      'password', 'remember_token',
  ];
  
  public function profile()
  {
      return $this-&gt;hasOne('App\Profile');
  }
  
  public function posts()
  {
     return $this-&gt;hasMany('App\Post');
  }
  }
  </code></pre>
  
  <p>This is my Profile.php file:</p>
  
  <pre><code>&lt;?php
  
  namespace App;
  
  use Illuminate\Database\Eloquent\Model;
  
  class Profile extends Model
  {
  
  public function user()
  {
      return $this-&gt;belongsTo('App\User');
  }
  
  protected $fillable = [
      'user_id', 'avatar', 'youtube', 'facebook', 'about'
  ];
  }
  </code></pre>
  
  <p>How do I fix this error?</p>