title: How to call controller function in view page in Laravel 5
body: <pre><code>public function getPendingOrder($id) 
  {
      $pendingOrder = DB::table('erp_purchase_order_details')-&gt;where('product_category_id','=',$id)-&gt;where('received','=','0')-&gt;count();  
  
      return $pendingOrder;
  }
  </code></pre>