Beispiel #1
0
 protected function selectQuery(array $where = [])
 {
     $query = parent::selectQuery($where);
     // Select 'key' too
     $query->select($this->getTable() . '.*', 'form_attributes.key')->join('form_attributes')->on('form_attribute_id', '=', 'form_attributes.id');
     return $query;
 }
Beispiel #2
0
 protected function selectQuery(array $where = [])
 {
     $query = parent::selectQuery($where);
     // Join to messages and load message id
     $query->join('messages', 'LEFT')->on('posts.id', '=', 'messages.post_id')->select(['messages.id', 'message_id'], ['messages.type', 'source']);
     return $query;
 }
Beispiel #3
0
 /**
  * Override selectQuery to enforce filtering by search=0/1
  */
 protected function selectQuery(array $where = [])
 {
     $query = parent::selectQuery($where);
     $query->where('search', '=', (int) $this->savedSearch);
     return $query;
 }