/**
  * Display a Listing of the resource.
  */
 public function index()
 {
     $purchaseOrder = Request::all();
     //dd(__METHOD__."(".__LINE__.")",compact('purchaseOrder'));
     if (count($purchaseOrder) == 0) {
         // lets provide a default filter
         $client = $this->clientRepository->filterOn(['Client_Name' => 'LCL'], 1);
         $purchaseOrder['Client'] = $client->objectID;
         $purchaseOrder['Expected'] = Carbon::today()->format('Y-m');
     }
     // using an implementation of the PurchaseOrder Repository Interface
     $purchaseOrders = $this->purchaseOrderRepository->paginate($purchaseOrder);
     // possible Statuses
     $statuses = [Lang::get('labels.enter.Status')] + Lang::get('lists.purchaseOrder.status');
     // Using the view(..) helper function
     return view('pages.purchaseOrder.index', compact('purchaseOrder', 'purchaseOrders', 'statuses'));
 }