I have a condition inside a relationship where if the user is logged in it will return the relation and if not i want it to return empty relationship. here is what i want :
public function dummy()
{
return (auth()->user()) ? $this->hasOne(blah::class) : emptyrelationship();
}