Laravel Count and GroupBy Field Query

I have been busy developing an e-commerce platform from zero to fulfill this semester project for Web Programming Course.

I need to select 5 the most popular product based on customer order. Customer order is stored in order_details table. To make a that query in laravel, try this:

Based on code snippet above, it will return 5 product_id as the most ordered product.

p/s: my 2016 mission, be a morning person!

Code Snippet: WordPress Nginx Configuration File With SSL Enable

WordPress is running smooth with Nginx. I have a server with DigitalOcean and currently use WordPress with Nginx. Here is the code snippet for Nginx configuration with SSL enable.

To use this code snippet, you are required to have a valid SSL installed on your server. After that replace example.com on the configuration code above with your own domain.

credit