title: PHP Lumen Call to a member function connection() on null
body: <p>I'm receiving this error when trying to use an Eloquent Model in Lumen.</p>
  <blockquote>
  <p>Call to a member function connection() on null</p>
  </blockquote>
  <p>Controller func:</p>
  <pre><code>/**
       * Display a listing of the resource.
       *
       * @return \Illuminate\Http\Response
       */
      public function index(Request $request)
      {
  
          $employees = Employee::orderBy('first_name', 'asc')-&gt;get();
  dd($employees);
  
          $response['precontent'] = view('admin::employee.search')-&gt;render();
  
          $response['content'] = view('admin::employee.index')
              -&gt;with(['employees' =&gt; $employees])
              -&gt;render();
  
          $response['title'] = 'Employees';
  
          return $response; 
  
      }
  </code></pre>
  <p>Model:</p>
  <pre><code>    &lt;?php
      namespace App;
  
  use Illuminate\Database\Eloquent\Model;
  
  class Employee extends Model 
  {
  
      protected $table = 'system_core.employees';
  
      protected $fillable = [
          'user_id',
          'first_name',
          'last_name',
          'position',
          'primary_address',
          'secondary_address',
          'phone_1',
          'phone_2',
          'birth_date',
          'start_date',
          'end_date'
      ];
  
  }
  </code></pre>
  <p>I'm pretty experienced with Laravel, but just started my first Lumen project for mere API use and I'm not sure why this error is being thrown. Perhaps it's just my connection settings? Would all queries have to be run the following way?:</p>
  <pre><code>$results = app('db')-&gt;select(&quot;SELECT * FROM users&quot;);
  </code></pre>
  <p>Thank you!</p>