Laravel and SQL server and database class
<p>I have got Laravel installed and I am trying to fetch ANY data from the SQL Server database but i keep having the same problem all the time and I am getting so frustrated because I either just don't know what I am doing or I am doing it wrong.</p>

<p>I've got my database connection set up after a lot of hassle with ODBC SQL Drivers for Windows. Now in my welcome.blade.php I want to fetch data from my database but everytime i try to get any data i get this error:</p>

<blockquote>
  <p>Fatal error: Class 'Illuminate\Support\Facades\DB' not found in
  C:\xampp\htdocs\resources\views\welcome.blade.php on line 9</p>
</blockquote>

<p>Now I only got these two lines in my code that should fetch (I GUESS) the data:</p>

<pre><code>&lt;?php
    $Booking = \Illuminate\Support\Facades\DB::table('fmsStage.dbo.Booking')-&gt;get();
    var_dump($Booking);
?&gt;
</code></pre>

<p>But instead it gives me that error. And I've tried using \DB::table and also tried using just the table itself \DB::table('Booking') and also with the table prefix \DB::table('dbo.Booking') but it won't even find the whole DB class. But what am I doing wrong, I don't get it at all.</p>

<p>When i try to add </p>

<blockquote>
  <p>use DB;</p>
</blockquote>

<p>It gives me another error/warning:</p>

<blockquote>
  <p>Warning: The use statement with non-compound name 'DB' has no effect in C:\xampp\htdocs\resources\views\welcome.blade.php on line 9</p>
</blockquote>

<p>UPDATE: I have now created the model Booking to get data from booking. But now when i use </p>

<pre><code>use App\Booking;
$booking = App\Booking::all();
foreach($booking as $bookings) {
    echo $bookings-&gt;agent;
}
</code></pre>

<p>It stills gives me an error on the freaking USE part...</p>

<blockquote>
  <p>Fatal error: Class 'app\Booking' not found in
  C:\xampp\htdocs\resources\views\welcome.blade.php on line 10</p>
</blockquote>

<p>Thank you in advance</p>