Obtenir la valeur sélectionnée parmi de nombreux lAravels

class User extends Model {
  public function products(): hasMany {
      return $this->hasMany('App\Product');
  }
}
$user = User::findOrFail($user_id);
/* user_id is must important is hasMany Relationship */
$user_products = $user->products()->select('product_name', 'category',
                                           'user_id')->get();
Lokesh003