title: laravel 5.4: seeding for inheritance model return error
body: <p>I have created base model and extend all my model from base model in laravel 5.4. When i do db:seed i got error </p>
  
  <blockquote>
    <p>Trying to get property of non-object</p>
  </blockquote>
  
  <p>. Anyone know why it happens? it is db:seed did not support model inheritance.</p>
  
  <p>Base Model:</p>
  
  <pre><code>    &lt;?php
  
  namespace App;
  
  use Illuminate\Database\Eloquent\Model;
  use Auth;
  
  class BaseModel extends Model
  {
      public static function boot()
       {
          parent::boot();
          static::creating(function($model)
          {
              $model-&gt;created_by = Auth::user()-&gt;id;
              $model-&gt;updated_by = Auth::user()-&gt;id;
          });
          static::updating(function($model)
          {
              $model-&gt;updated_by = Auth::user()-&gt;id;
          });   
          static::deleting(function($model)
          {
              $model-&gt;deleted_by = Auth::user()-&gt;id;
              $model-&gt;save();
          });
      }
  }
  </code></pre>
  
  <p>Model:</p>
  
  <pre><code>    &lt;?php
  
  namespace App;
  
  use Illuminate\Database\Eloquent\SoftDeletes;
  
  class Bank extends BaseModel
  {
      use SoftDeletes;
  
      public static function boot()
      {
          parent::boot();
      }
  }
  </code></pre>
  
  <p>Seeder:</p>
  
  <pre><code>    &lt;?php
  
  use Illuminate\Database\Seeder;
  use App\Bank as Bank;
  
  class BanksTableSeeder extends Seeder
  {
      /**
       * Run the database seeds.
       *
       * @return void
       */
      public function run()
      {
          Bank::create( [
              'name' =&gt; 'xxxxxxxx' ,
          ] );
      }
  }
  </code></pre>