title: Can't Select in Laravel using Eloquent and SQL Server Database
body: <p>Greatings,
  I'm very new in laravel. Today I make a project with Laravel and SQL Server for the database.
  I can connect to that DB, and I can make the default migration using user migration. but when I select the table user and return it into json the result is blank.
  That's my select</p>
  <pre><code>    {
          //
          $dataUser = User::all();
          return response()-&gt;json($dataUser);
      }
  </code></pre>
  <p>and the result only [] on browser, I use Postman too, but the result was same. I have 2 record on DB.</p>
  <p>and then wan't to do with different table, I'm use existing table, the table name is Purchases, the table have around 100 record. and that's my model for the table</p>
  <pre><code>&lt;?php
  
  namespace App;
  
  use Illuminate\Database\Eloquent\Model;
  
  class Purchases extends Model
  {
      protected $table = 'Purchases';
      protected $primaryKey = 'PurchaseID';
      protected $guarded = ['PurchaseID'];
      const CREATED_AT = 'CreatedTime';
      const UPDATED_AT = 'LastModifiedTime';
  }
  ?&gt;
  </code></pre>
  <p>I use the same code in the purchaseController</p>
  <pre><code>namespace App\Http\Controllers;
  use App\Purchases;
  
  public function index()
      {
          //
          $dataPurchase = Purchases::all();
          return response()-&gt;json($dataPurchase);
      }
  </code></pre>
  <p>but when I load the browser that return error like this</p>
  <pre><code>Illuminate\Database\QueryException
  SQLSTATE[42S02]: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Invalid object name 'purchases'. (SQL: select * from [purchases])
  </code></pre>
  <p>in my SSMS, my table is [dbo].[purchases] and the migration is [dbo].[users]</p>
  <p>Please help me to resolve that.
  Thankyou</p>
  <p><strong>EDIT</strong>: I think I have a problem on my connection, because I only register the php PDO driver on apache, and change the laravel config. I can using migration, but when I use faker, the data that's showing on tinker not save on DB users</p>