title: Laravel Eloquent nullable fields value converted to string "NULL"
body: <p>I have in my model a query to get data from the database and there are nullable fields present in my database table. When I try to display all the records in my view, the fields which are of null value, is displayed as "NULL". I want these values to be display as just empty string.</p>
  
  <p>Here is what I have in my controller:</p>
  
  <pre><code>public function showDetails($action, $id)
  {
          $data_model= new PersonData();
          $persons= $data_model-&gt;loadSpecificPerson($id);
  
          return view('pages.admin.reporting_person_details', ['action' =&gt; $action, 'id' =&gt; $id])-&gt;with('id', $id)-&gt;with(compact('persons'));
  }
  </code></pre>
  
  <p>In my model:</p>
  
  <pre><code>public function loadSpecificPerson($id)
  {
          $persons = DB::select("SELECT * FROM complainant_t WHERE ComplainantID = ?", [$id]);
          return $persons;
  }
  </code></pre>
  
  <p>I wanted to do it like how you would do it in an array:</p>
  
  <pre><code>foreach($array as $key =&gt; $value)
  {
     if($array[$key] == NULL)
     {
          $array[$key] = "";
     }
  }
  </code></pre>
  
  <p>This isn't possible to use with $persons since it's an object and must be accessed with name right? So how should I perform this without having to access it by the column names?</p>