title: Laravel: getting a single value from a MySQL query
body: <p>I'm trying get a single value from MySQL database using laravel but the problem I'm getting an array . this is my query result in MySQL command line:</p>
  
  <pre><code>select groupName from users;
  </code></pre>
  
  <hr>
  
  <pre><code>+-----------+
  | groupName |
  +-----------+
  | Admin     |
  +-----------+
  </code></pre>
  
  <p>my laravel function:</p>
  
  <pre><code>public static function PermitAddNewUser(){
      $username=Session::get('key');
      $data=DB::select("select groupName from users where username='$username';");
      return $data; 
  }
  </code></pre>
  
  <p>expected $data value is a string with value= Admin</p>
  
  <p>but what i get is : <code>[{"groupName":"Admin"}]</code></p>