title: laravel Illegal offset type error
body: <p>I have a page that shows the details of a single test case. For some reason, I can't get past this error, even to send the <code>$id</code>. Here's my controller:</p>
  
  <pre><code>public function show($id)
  {
      $data =DB::table('TestCase')-&gt;where('TestCaseID', $id);
      return view('managements.testcase-details')-&gt;with($data);
  }
  </code></pre>
  
  <p>Here's the error:</p>
  
  <blockquote>
    <p>in View.php line 180
    at HandleExceptions->handleError('2', 'Illegal offset type', 'C:\xampp\htdocs\terkwazmng\vendor\laravel\framework\src\Illuminate\View\View.php', '180', array('key' => object(Builder), 'value' => null)) </p>
  </blockquote>