Is there an abbreviated way to identify the columns of each table by creating the query in this way?
$product = Product::with(['order'])->where('user_id','=',\Auth::user()->id)->find($id);
For example, specifying something like this:
->where('order.user_id','=',\Auth::user()->id)
user_id is a field in the order table, the example does not work because does not recognize the user_id field .
Or for this type of query I need to use if or if the buldier DB ::