Drivez
1 month ago

Get BelongsTo with trashed

Posted 1 month ago by Drivez

i found an old article that says in a belongsTo you can ask for tht soft deleted recordes as well, like. this:

return $this->belongsTo(Income::class, 'income_id')->withTrashed();

But i am not getting this to work in laravel 7 Any tips?

Please sign in or create an account to participate in this conversation.