public function eagerLoadWhere($table, $product_id) { // $this->raise(new ProductWasPosted(new Product())); return Product::with(['category', 'tax', 'product_attribute_category', 'varchar_values', 'text_values', 'int_values', 'product_translations' => function ($query) { //$query->orderBy('product.id', $product_id); $query->where('product_translations.locale', '=', App::getLocale()); }])->find($product_id); }