title: How do i change the format of an SQL output?
body: <p>I am using Laravel 5.5, and when I am trying to export data from another DB, i use:</p>
  
  <pre><code>$fname = DB::connection('smallplanet')-&gt;table('pilots')-&gt;where('id', Auth::user()-&gt;id)-&gt;get(['fname']);
  echo $fname;
  </code></pre>
  
  <p>and this is the output:</p>
  
  <pre><code>[{"fname":"Aidas1"}]
  </code></pre>
  
  <p>how do i change the output to just "Aidas1"?</p>