title: internal server error in heroku
body: <p>I'm currently using laravel and my website is just working fine</p>
  
  <p>But upon hosting it I'm getting a problem internal server error but I figured out what the problem is, it's inside the controller</p>
  
  <pre><code>public function update(Request $request, $id)
  {
      $patient = Patient::find($request-&gt;id);
      $patient-&gt;$request['col'] = $request-&gt;value;
      $patient-&gt;save();
  }
  </code></pre>
  
  <p>the <code>$request['col']</code> is the one i passed from my inline table editor plugin and</p>
  
  <p>here is the code: </p>
  
  <pre><code> $('.edit').editable('posts.update', {
   event: 'click',
   indicator : 'saving ...',
   select : true,
   submitdata : function(value, settings) {
     return {_method: "PUT",_token:token,col:$(this).attr("class").split(' ')[1]};
   },callback : function(value, settings) {
       $(this).addClass('success');
   }
   });
  </code></pre>
  
  <p>I get class of an element  <code>col:$(this).attr("class").split(' ')</code> and passing it to the update function so it will dynamically update the column of the database</p>
  
  <p>But after hosting it to heroku I'm getting an error so i have tried putting a column name statically <code>$patient-&gt;name = $request-&gt;value;</code> and it's working fine then i have tried storing the name column to a variable to figure out what is really the problem <code>$name = 'name';</code> then <code>$patient-&gt;$name = $request-&gt;value;</code> then I get the error again.</p>