SHARE
TWEET

Untitled

a guest Sep 19th, 2019 103 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. {
  2.  
  3.  
  4.         $keyword = $this->request->getQuery('keyword');
  5.         if(!empty($keyword)){
  6.             $this->paginate = [
  7.                     'contain' => ['Client', 'Users'],
  8.                     'conditions' => ['OR' => [ 'Client.client_name LIKE '=>'%'.$keyword. '%', 'Users.consultant_name LIKE '=>'%'.$keyword. '%','Client.client_id ='.(int)$keyword, 'Users.Consultant_ID ='.(int)$keyword, 'Job_Type LIKE '=>'%'.$keyword.'%', 'Job_Status LIKE '=>'%'.$keyword.'%', 'job_id ='.(int)$keyword, 'Job_Notes LIKE '=>'%'.$keyword.'%' ,  'Job_Date LIKE '=>'%'.$keyword.'%','Job_Item LIKE '=>'%'.$keyword.'%']],
  9.                 'order' => array('Job_Date' =>'desc'),
  10.                 'finder' => 'ListJob',
  11.                 'sortWhitelist' => [
  12.                     'Job_Date',
  13.                     'Job_Type',
  14.  
  15.                     'Job_Status',
  16.                     'Client.client_name',
  17.                     'Users.consultant_name',
  18.                     'Job_Item',
  19.                     'Job_Total_Hours']
  20.  
  21.             ];
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top