find() public method

public find ( $filter = null, $userId = false )
 /**
  * @param $search
  * @param $userId
  * @return \Illuminate\Http\JsonResponse
  */
 public function getDatatable($search, $userId)
 {
     $datatable = new ClientDatatable();
     $query = $this->clientRepo->find($search, $userId);
     return $this->datatableService->createDatatable($datatable, $query);
 }