morphMany(ImportLog::class, 'importable'); } public function files() { return $this->morphMany(File::class, 'fileable'); } public function policies() { return $this->hasMany(CorporatePolicy::class); } public function currentPolicy() { return $this->hasOne(CorporatePolicy::class) // ->where('start', '<=', now()) // ->where('end', '>=', now()) ->where('active', true) ->latestOfMany(); } }