title: PHP (Laravel) issue
body: <p>I am receiving an error from running the below code?</p>
  
  <pre><code>(1/1) ErrorException
  Creating default object from empty value
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>public function setServiceSetting(Request $request) {
      if (!$request-&gt;has('setting_key') ||
          !$request-&gt;has('setting_value')) {
          return $this-&gt;getScriptingResponse();
      }
  
      $settingKey = $request-&gt;input('setting_key');
      $settingValue = $request-&gt;input('setting_value');
  
      $settings = WebsiteSettings::first();
  
      if ($settings == null) {
          return;
      }
  
      $setting-&gt;$settingKey = $settingValue;
      $settings-&gt;save();
  }
  </code></pre>
  
  <p>Error Line:</p>
  
  <pre><code>$setting-&gt;$settingKey = $settingValue;
  </code></pre>
  
  <p>I know the column exists, below anyone suggests that. I also know both parameters are non-null. </p>