Respectful bump.
I just want to be able to control what queries use the deleted_at column.
I'm thinking the answer may be to just disable the automatic soft-deleting and add a scope element to the model.
When you call the relationship as a function, it creates a new query builder. So you need to use get() or first() in order to use the results:
$car->owner()->withTrashed()->first()->name
See this section of the docs for more info: http://laravel.com/docs/eloquent#one-to-many
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community