public function show(Product $product)
    {
        $product->load('group', 'category');

        //increasing product counters, in order to have a suggestion orden
        (new ProductsRepository)->increment('view_counts', $product);

        //saving the product tags into users preferences
        if (trim($product->tags) != '' && auth()->check()) {
            auth()->user()->updatePreferences('product_viewed', $product->tags);
        }

        return view('products.detailProd', [
            'suggestions' => Suggestions\Suggest::for('product_viewed')->shake()->get('product_viewed'),
            'reviews' => OrderDetail::ReviewsFor($product->id),
            'allWishes' => Order::forSignedUser('wishlist'),
            'features' => Feature::filterable()->get(),
            'product' => $product,
        ]);
    }
public function show(Product $product)
    {
        $product->load('group', 'category');

        //increasing product counters, in order to have a suggestion orden
        (new ProductsRepository)->increment('view_counts', $product);

        //saving the product tags into users preferences
        if (trim($product->tags) != '' && auth()->check()) {
            auth()->user()->updatePreferences('product_viewed', $product->tags);
        }

        return view('products.detailProd', [
            'suggestions' => Suggestions\Suggest::for('product_viewed')->shake()->get('product_viewed'),
            'reviews' => OrderDetail::ReviewsFor($product->id),
            'allWishes' => Order::forSignedUser('wishlist'),
            'features' => Feature::filterable()->get(),
            'product' => $product,
        ]);
    }
public function show ( Product $ product ) { $ product -> load ( 'group' , 'category' ) ; //increasing product counters, in order to have a suggestion orden ( new ProductsRepository ) -> increment ( 'view_counts' , $ product ) ; //saving the product tags into users preferences if ( trim ( $ product -> tags ) != '' && auth ( ) -> check ( ) ) { auth ( ) -> user ( ) -> updatePreferences ( 'product_viewed' , $ product -> tags ) ; } return view ( 'products.detailProd' , [ 'suggestions' => Suggestions \ Suggest :: for ( 'product_viewed' ) -> shake ( ) -> get ( 'product_viewed' ) , 'reviews' => OrderDetail :: ReviewsFor ( $ product -> id ) , 'allWishes' => Order :: forSignedUser ( 'wishlist' ) , 'features' => Feature :: filterable ( ) -> get ( ) , 'product' => $ product , ] ) ; }
Display the given product.

@param Product $product

@return void
Display the given product .