How to convert the following Laravel (v8) Query to Eloquent? That is possible?
'house_id' => DB::table('houses') ->select('id') ->where('user_id', Auth::user()->id) ->orderByDesc('created_at')->value('id')
The current query is doing the job, but I'm curious to know if the same can be done with Eloquent. In other words, there's a more elegant way to do the same?
Sorry if my question doesn't make sense at all.
Thank you very much for any clarification.