Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- $keyword = $this->request->getQuery('keyword');
- if(!empty($keyword)){
- $this->paginate = [
- 'contain' => ['Client', 'Users'],
- '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.'%']],
- 'order' => array('Job_Date' =>'desc'),
- 'finder' => 'ListJob',
- 'sortWhitelist' => [
- 'Job_Date',
- 'Job_Type',
- 'Job_Status',
- 'Client.client_name',
- 'Users.consultant_name',
- 'Job_Item',
- 'Job_Total_Hours']
- ];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement