title: laravel htmlentities() expects parameter 1 to be string, array given (raw sql count)
body: <p>I am having the following error: <code>htmlentities() expects parameter 1 to be string, array given</code> when I am executing the following sql statement in laravel.</p>
  
  <pre><code>public function index($id)
  {
      $event = Task::find($id);
      //$tickremain = DB::select(DB::raw("SELECT artists FROM tasks where id='1'"));
      $tickremain = DB::table('tasks')-&gt;select(DB::raw('count(*) as thresholdc'))-&gt;get();
  
      return view('buy.index', ['event' =&gt; $event],['tickremain'=&gt;$tickremain]);
  }
  </code></pre>
  
  <p>My view:</p>
  
  <pre><code>&lt;p&gt;No. of Tickets remaining: {{$tickremain}}&lt;/p&gt;
  </code></pre>
  
  <p>I want to get a count of a column field but I'm left with that error.</p>