belongsTo(SoftDeletableModel::class, 'soft_deletable_model_id'); } public function softDeletableWithTrashed(): BelongsTo { return $this->belongsTo(SoftDeletableModel::class, 'soft_deletable_model_id')->withTrashed(); } public function softDeletableOnlyTrashed(): BelongsTo { return $this->belongsTo(SoftDeletableModel::class, 'soft_deletable_model_id')->onlyTrashed(); } public function softDeletableWithoutTrashed(): BelongsTo { return $this->belongsTo(SoftDeletableModel::class, 'soft_deletable_model_id')->withoutTrashed(); } public function nonSoftDeletable(): BelongsTo { return $this->belongsTo(NonSoftDeletableModel::class, 'non_soft_deletable_model_id'); } public function softDeletableHasOne(): HasOne { return $this->hasOne(SoftDeletableModel::class, 'model_with_relations_id'); } public function nonSoftDeletableHasOne(): HasOne { return $this->hasOne(NonSoftDeletableModel::class, 'model_with_relations_id'); } }